home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / OCEAuthDir.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  181KB  |  4,546 lines

  1. /*
  2.      File:        OCEAuthDir.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __OCEAUTHDIR__
  19. #define __OCEAUTHDIR__
  20.  
  21. #ifndef __APPLETALK__
  22. #include <AppleTalk.h>
  23. #endif
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. #ifndef __OSUTILS__
  28. #include <OSUtils.h>
  29. #endif
  30. #ifndef __TYPES__
  31. #include <Types.h>
  32. #endif
  33. #ifndef __OCE__
  34. #include <OCE.h>
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT_SUPPORTED
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_ALIGN_SUPPORTED
  46. #pragma options align=mac68k
  47. #endif
  48.  
  49. #if FOR_SYSTEM7_ONLY
  50. /*****************************************************************************/
  51.  
  52. enum {
  53.     kRC4KeySizeInBytes            = 8,                            /* size of an RC4 key */
  54.     kRefNumUnknown                = 0
  55. };
  56.  
  57.  
  58. enum {
  59.     kEnumDistinguishedNameBit    = 0,
  60.     kEnumAliasBit                = 1,
  61.     kEnumPseudonymBit            = 2,
  62.     kEnumDNodeBit                = 3,
  63.     kEnumInvisibleBit            = 4
  64. };
  65.  
  66. /* Values of DirEnumChoices */
  67.  
  68. enum {
  69.     kEnumDistinguishedNameMask    = 1L << kEnumDistinguishedNameBit,
  70.     kEnumAliasMask                = 1L << kEnumAliasBit,
  71.     kEnumPseudonymMask            = 1L << kEnumPseudonymBit,
  72.     kEnumDNodeMask                = 1L << kEnumDNodeBit,
  73.     kEnumInvisibleMask            = 1L << kEnumInvisibleBit,
  74.     kEnumAllMask                = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  75. };
  76.  
  77. typedef unsigned long DirEnumChoices;
  78. /* Values of DirSortOption */
  79.  
  80. enum {
  81.     kSortByName                    = 0,
  82.     kSortByType                    = 1
  83. };
  84.  
  85. /* Values of DirSortDirection */
  86.  
  87. enum {
  88.     kSortForwards                = 0,
  89.     kSortBackwards                = 1
  90. };
  91.  
  92. /* Values of DirMatchWith */
  93.  
  94. enum {
  95.     kMatchAll                    = 0,
  96.     kExactMatch                    = 1,
  97.     kBeginsWith                    = 2,
  98.     kEndingWith                    = 3,
  99.     kContaining                    = 4
  100. };
  101.  
  102. typedef unsigned char DirMatchWith;
  103.  
  104. enum {
  105.     kCurrentOCESortVersion        = 1
  106. };
  107.  
  108. /*
  109.   Access controls are implemented on three levels:
  110.  *      DNode, Record, and Attribute Type levels
  111.  *  Some access control bits apply to the container itself, and some apply to its contents.
  112.  *
  113.  *  The Catalog Toolbox supports six functions.  These calls are:
  114.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  115.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  116.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  117.  * 
  118.  *  The GetXXXAccessControl calls will return access control masks for various categories
  119.  *  of users.  Please refer to the access control document for a description of the
  120.  *  categories of users.  In general these are:
  121.  *      ThisRecordOwner         - means the identity of the record itself
  122.  *      Friends                  - means any one of the assigned friends for the record
  123.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  124.  *          in the DNode in which this record is located
  125.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  126.  *      Guest                      - means an unauthenticated user.
  127.  *  Bit masks for various permitted access controls are defined below.
  128.  *
  129.  *  GetXXXAccessControl calls will return access control masks for various categories of
  130.  *  users for this record. In addition they also return the level of access controls
  131.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  132.  *  record, or attribute type.
  133.  *
  134.  *  For records, the access control granted will be minimum of the DNode access
  135.  *  control and record access control masks.  For example, to add an attribute type to a
  136.  *  record, a user must have access control kCreateAttributeTypes at the record and
  137.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  138.  *  minimum of the DNode, record, and attribute type access controls.
  139.  *
  140.  *  
  141. */
  142. /* access privileges bit numbers */
  143.  
  144. enum {
  145.     kSeeBit                        = 0,
  146.     kAddBit                        = 1,
  147.     kDeleteBit                    = 2,
  148.     kChangeBit                    = 3,
  149.     kRenameBit                    = 4,
  150.     kChangePrivsBit                = 5,
  151.     kSeeFoldersBit                = 6
  152. };
  153.  
  154. /* Values of AccessMask */
  155.  
  156. enum {
  157.     kSeeMask                    = (1L << kSeeBit),
  158.     kAddMask                    = (1L << kAddBit),
  159.     kDeleteMask                    = (1L << kDeleteBit),
  160.     kChangeMask                    = (1L << kChangeBit),
  161.     kRenameMask                    = (1L << kRenameBit),
  162.     kChangePrivsMask            = (1L << kChangePrivsBit),
  163.     kSeeFoldersMask                = (1L << kSeeFoldersBit)
  164. };
  165.  
  166.  
  167. enum {
  168.     kAllPrivs                    = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
  169.     kNoPrivs                    = 0
  170. };
  171.  
  172. /*
  173.  
  174. kSupportsDNodeNumberBit:
  175. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  176. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  177. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  178. later case DNodeNumber component inside record location info must be set to zero.
  179.  
  180. kSupportsRecordCreationIDBit:
  181. If this bit is set, a record can be referenced by specifying CreationID 
  182. in most catalog manager calls. If this bit is not set recordName and recordType are 
  183. required in the recordID specification for all catalog manager calls.
  184.  
  185. kSupportsAttributeCreationIDBit:
  186. If this bit is set, an attribute value can be obtained by specifying it's 
  187. CreationID in Lookup call staring point and also can be used in operations 
  188. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  189. specified by AttributeType and CreationID.
  190.  
  191. *************************************************************************
  192. Implicit assumption with creationID's and dNodeNumbers are, when supported
  193. they are persistent and will preserved across boots and life of the system.
  194. *************************************************************************
  195.  
  196. Following three bits are for determining the sort order in enumeration.
  197. kSupportsMatchAllBit:
  198. If this bit is set, enumeration of all the records is supported
  199.  
  200. kSupportsBeginsWithBit:
  201. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  202. is supported
  203.  
  204. kSupportsExactMatchBit:
  205. If this bit is set, existence of a record matching exact matchNameString and recordType
  206. is supported.
  207.  
  208. kSupportsEndsWithBit:
  209. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  210. is supported.
  211.  
  212. kSupportsContainsBit:
  213. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  214. is supported
  215.  
  216.  
  217. Implicit assumption in all these is, a record type can be specified either as one of the above or
  218. a type list(more then one) to match exact type.
  219. The Following four bits will indicate sort ordering in enumeration.
  220.  
  221. kSupportsOrderedEnumerationBit:
  222. If this bit is set, Enumerated records or in some order possibly in name order.
  223.  
  224. kCanSupportNameOrderBit:
  225. If this is set, catalog will support sortbyName option in Enumerate.
  226.  
  227. kCanSupportTypeOrderBit:
  228. If this bit is set, catalog will support sortbyType option in enumearte.
  229.  
  230. kSupportSortBackwardsBit:
  231. If this bit is set, catalog supports backward sorting.
  232.  
  233. kSupportIndexRatioBit:
  234. If this bit is set, it indicates that enumeration will return approximate position
  235. of a record (percentile) among all records.
  236.  
  237. kSupportsEnumerationContinueBit:
  238. If this bit is set, catalog supports enumeration continue.
  239.  
  240. kSupportsLookupContinueBit:
  241. If this bit is set, catalog supports lookup continue.
  242.  
  243. kSupportsEnumerateAttributeTypeContinueBit:
  244. If this bit is set, catalog supports EnumerateAttributeType continue.
  245.  
  246. kSupportsEnumeratePseudonymContinueBit:
  247. If this bit is set, catalog supports EnumeratePseudonym continue.
  248.  
  249. kSupportsAliasesBit:
  250. If this bit is set, catalog supports create/delte/enumerate 
  251. of Alias Records.
  252.  
  253. kSupportPseudonymBit: 
  254. If this bit is set, catalog supports create/delte/enumerate of 
  255. pseudonyms for a record.
  256.  
  257. kSupportsPartialPathNameBit:
  258. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  259. intermediate DNode and a partial name starting from that DNode to the intended 
  260. DNode.
  261.  
  262. kSupportsAuthenticationBit:
  263. If this bit is set, catalog supports authentication manager calls.
  264.  
  265. kSupportsProxiesBit:
  266. If this bit is set, catalog supports proxy related calls in authentication manager. 
  267.  
  268. kSupportsFindRecordBit:
  269. If this bit is set, catalog supports find record call.
  270.  
  271. Bits and corresponding masks are as defined below.
  272. */
  273.  
  274. enum {
  275.     kSupportsDNodeNumberBit        = 0,
  276.     kSupportsRecordCreationIDBit = 1,
  277.     kSupportsAttributeCreationIDBit = 2,
  278.     kSupportsMatchAllBit        = 3,
  279.     kSupportsBeginsWithBit        = 4,
  280.     kSupportsExactMatchBit        = 5,
  281.     kSupportsEndsWithBit        = 6,
  282.     kSupportsContainsBit        = 7,
  283.     kSupportsOrderedEnumerationBit = 8,
  284.     kCanSupportNameOrderBit        = 9,
  285.     kCanSupportTypeOrderBit        = 10,
  286.     kSupportSortBackwardsBit    = 11,
  287.     kSupportIndexRatioBit        = 12,
  288.     kSupportsEnumerationContinueBit = 13,
  289.     kSupportsLookupContinueBit    = 14,
  290.     kSupportsEnumerateAttributeTypeContinueBit = 15,
  291.     kSupportsEnumeratePseudonymContinueBit = 16,
  292.     kSupportsAliasesBit            = 17,
  293.     kSupportsPseudonymsBit        = 18,
  294.     kSupportsPartialPathNamesBit = 19,
  295.     kSupportsAuthenticationBit    = 20,
  296.     kSupportsProxiesBit            = 21,
  297.     kSupportsFindRecordBit        = 22
  298. };
  299.  
  300. /* values of DirGestalt */
  301.  
  302. enum {
  303.     kSupportsDNodeNumberMask    = 1L << kSupportsDNodeNumberBit,
  304.     kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
  305.     kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
  306.     kSupportsMatchAllMask        = 1L << kSupportsMatchAllBit,
  307.     kSupportsBeginsWithMask        = 1L << kSupportsBeginsWithBit,
  308.     kSupportsExactMatchMask        = 1L << kSupportsExactMatchBit,
  309.     kSupportsEndsWithMask        = 1L << kSupportsEndsWithBit,
  310.     kSupportsContainsMask        = 1L << kSupportsContainsBit,
  311.     kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
  312.     kCanSupportNameOrderMask    = 1L << kCanSupportNameOrderBit,
  313.     kCanSupportTypeOrderMask    = 1L << kCanSupportTypeOrderBit,
  314.     kSupportSortBackwardsMask    = 1L << kSupportSortBackwardsBit,
  315.     kSupportIndexRatioMask        = 1L << kSupportIndexRatioBit,
  316.     kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
  317.     kSupportsLookupContinueMask    = 1L << kSupportsLookupContinueBit,
  318.     kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
  319.     kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
  320.     kSupportsAliasesMask        = 1L << kSupportsAliasesBit,
  321.     kSupportsPseudonymsMask        = 1L << kSupportsPseudonymsBit,
  322.     kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
  323.     kSupportsAuthenticationMask    = 1L << kSupportsAuthenticationBit,
  324.     kSupportsProxiesMask        = 1L << kSupportsProxiesBit,
  325.     kSupportsFindRecordMask        = 1L << kSupportsFindRecordBit
  326. };
  327.  
  328. /* Values of AuthLocalIdentityOp */
  329.  
  330. enum {
  331.     kAuthLockLocalIdentityOp    = 1,
  332.     kAuthUnlockLocalIdentityOp    = 2,
  333.     kAuthLocalIdentityNameChangeOp = 3
  334. };
  335.  
  336. /* Values of AuthLocalIdentityLockAction */
  337.  
  338. enum {
  339.     kAuthLockPending            = 1,
  340.     kAuthLockWillBeDone            = 2
  341. };
  342.  
  343. /* Values of AuthNotifications */
  344.  
  345. enum {
  346.     kNotifyLockBit                = 0,
  347.     kNotifyUnlockBit            = 1,
  348.     kNotifyNameChangeBit        = 2
  349. };
  350.  
  351.  
  352. enum {
  353.     kNotifyLockMask                = 1L << kNotifyLockBit,
  354.     kNotifyUnlockMask            = 1L << kNotifyUnlockBit,
  355.     kNotifyNameChangeMask        = 1L << kNotifyNameChangeBit
  356. };
  357.  
  358.  
  359. enum {
  360.     kPersonalDirectoryFileCreator = 'kl03',
  361.     kPersonalDirectoryFileType    = 'pabt',
  362.     kBusinessCardFileType        = 'bust',
  363.     kDirectoryFileType            = 'dirt',
  364.     kDNodeFileType                = 'dnod',
  365.     kDirsRootFileType            = 'drtt',
  366.     kRecordFileType                = 'rcrd'
  367. };
  368.  
  369. typedef unsigned short DirSortOption;
  370. typedef unsigned short DirSortDirection;
  371. typedef unsigned long AccessMask;
  372. typedef unsigned long DirGestalt;
  373. typedef unsigned long AuthLocalIdentityOp;
  374. typedef unsigned long AuthLocalIdentityLockAction;
  375. typedef unsigned long AuthNotifications;
  376. struct DNodeID {
  377.     DNodeNum                         dNodeNumber;                /* dNodenumber  */
  378.     long                             reserved1;
  379.     RStringPtr                         name;
  380.     long                             reserved2;
  381. };
  382. typedef struct DNodeID DNodeID;
  383.  
  384. struct DirEnumSpec {
  385.     DirEnumChoices                     enumFlag;
  386.     unsigned short                     indexRatio;                    /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  387.     union {
  388.         LocalRecordID                     recordIdentifier;
  389.         DNodeID                         dNodeIdentifier;
  390.     }                                 u;
  391. };
  392. typedef struct DirEnumSpec DirEnumSpec;
  393.  
  394. struct DirMetaInfo {
  395.     unsigned long                     info[4];
  396. };
  397. typedef struct DirMetaInfo DirMetaInfo;
  398.  
  399. struct SLRV {
  400.     ScriptCode                         script;                        /*   Script code in which entries are sorted */
  401.     short                             language;                    /*   Language code in which entries are sorted */
  402.     short                             regionCode;                    /*   Region code in which entries are sorted */
  403.     short                             version;                    /*  version of oce sorting software */
  404. };
  405. typedef struct SLRV SLRV;
  406.  
  407. /* Catalog types and operations */
  408. /* unique identifier for an identity */
  409. typedef unsigned long AuthIdentity;
  410. /* Umbrella LocalIdentity */
  411. typedef AuthIdentity LocalIdentity;
  412. /* A DES key is 8 bytes of data */
  413. struct DESKey {
  414.     unsigned long                     a;
  415.     unsigned long                     b;
  416. };
  417. typedef struct DESKey DESKey;
  418.  
  419. typedef Byte RC4Key[8];
  420. typedef unsigned long AuthKeyType;
  421. /* key type followed by its data */
  422. struct AuthKey {
  423.     AuthKeyType                     keyType;
  424.     union {
  425.         DESKey                             des;
  426.         RC4Key                             rc4;
  427.     }                                 u;
  428. };
  429. typedef struct AuthKey AuthKey;
  430.  
  431. typedef AuthKey *AuthKeyPtr;
  432. typedef union AuthParamBlock AuthParamBlock;
  433. typedef AuthParamBlock *AuthParamBlockPtr;
  434. /* Fix parameter passing convention (#1274062) ggs, 8-7-95 */
  435. /*
  436.         This ProcPtr uses register based parameters on the 68k and cannot
  437.         be written in or called from a high-level language without the help of
  438.         mixed mode or assembly glue.
  439.  
  440.             typedef pascal void (*AuthIOCompletionProcPtr)(AuthParamBlockPtr paramBlock);
  441.  
  442. */
  443.  
  444. #if GENERATINGCFM
  445. typedef UniversalProcPtr AuthIOCompletionUPP;
  446. #else
  447. typedef Register68kProcPtr AuthIOCompletionUPP;
  448. #endif
  449. /*
  450. ****************************************************************************
  451.  
  452.  
  453.         Authentication Manager operations 
  454.  
  455. ****************************************************************************
  456. */
  457. /*
  458. kAuthResolveCreationID:
  459. userRecord will contain the user information whose creationID has to be
  460. returned. A client must make this call when he does not know the creaitionID.
  461. The creationID must be set to nil before making the call. The server will attempt
  462. to match the recordid's in the data base which match the user name and
  463. type in the record.  Depending on number of matchings, following
  464. results will be returned.
  465. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  466. totalMatches = actualMatches = 1.
  467. > 1 Match:
  468.     Buffer is Large Enough:
  469.     totalMatches = actualMatches
  470.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  471. > 1 Match:
  472.     Buffer is not Large Enough:
  473.     totalMatches > actualMatches
  474.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  475. 0 Matches:
  476.  kOCENoSuchRecord error
  477. */
  478. struct AuthResolveCreationIDPB {
  479.     void *                            qLink;
  480.     long                             reserved1;
  481.     long                             reserved2;
  482.     AuthIOCompletionUPP             ioCompletion;
  483.     OSErr                             ioResult;
  484.     unsigned long                     saveA5;
  485.     short                             reqCode;
  486.     long                             reserved[2];
  487.     AddrBlock                         serverHint;
  488.     short                             dsRefNum;
  489.     unsigned long                     callID;
  490.     AuthIdentity                     identity;
  491.     long                             gReserved1;
  492.     long                             gReserved2;
  493.     long                             gReserved3;
  494.     long                             clientData;
  495.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  496.     unsigned long                     bufferLength;                /*  --> Buffer Size to hold duplicate Info */
  497.     void *                            buffer;                        /*  --> Buffer  to hold duplicate Info */
  498.     unsigned long                     totalMatches;                /* <--  Total Number of matching names found */
  499.     unsigned long                     actualMatches;                /* <--  Number of matches returned in the buffer */
  500. };
  501. typedef struct AuthResolveCreationIDPB AuthResolveCreationIDPB;
  502.  
  503. /*
  504. kAuthBindSpecificIdentity:
  505. userRecord will contain the user information whose identity has to be
  506. verified. userKey will contain the userKey. An Identity is returned which
  507. binds the key and the userRecord. The identity returned can be used in the 'identity'
  508. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  509. Authentication manager calls.
  510. */
  511. struct AuthBindSpecificIdentityPB {
  512.     void *                            qLink;
  513.     long                             reserved1;
  514.     long                             reserved2;
  515.     AuthIOCompletionUPP             ioCompletion;
  516.     OSErr                             ioResult;
  517.     unsigned long                     saveA5;
  518.     short                             reqCode;
  519.     long                             reserved[2];
  520.     AddrBlock                         serverHint;
  521.     short                             dsRefNum;
  522.     unsigned long                     callID;
  523.     AuthIdentity                     identity;
  524.     long                             gReserved1;
  525.     long                             gReserved2;
  526.     long                             gReserved3;
  527.     long                             clientData;
  528.     AuthIdentity                     userIdentity;                /* <--  binding identity */
  529.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  530.     AuthKeyPtr                         userKey;                    /*  --> OCE Key for the user */
  531. };
  532. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  533.  
  534. /*
  535. kAuthUnbindSpecificIdentity:
  536. This call will unbind the userRecord and key which were bind earlier.
  537. */
  538. struct AuthUnbindSpecificIdentityPB {
  539.     void *                            qLink;
  540.     long                             reserved1;
  541.     long                             reserved2;
  542.     AuthIOCompletionUPP             ioCompletion;
  543.     OSErr                             ioResult;
  544.     unsigned long                     saveA5;
  545.     short                             reqCode;
  546.     long                             reserved[2];
  547.     AddrBlock                         serverHint;
  548.     short                             dsRefNum;
  549.     unsigned long                     callID;
  550.     AuthIdentity                     identity;
  551.     long                             gReserved1;
  552.     long                             gReserved2;
  553.     long                             gReserved3;
  554.     long                             clientData;
  555.     AuthIdentity                     userIdentity;                /*  --> identity to be deleted */
  556. };
  557. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  558.  
  559. /*
  560. kAuthGetSpecificIdentityInfo:
  561. This call will return the userRecord for the given identity. Note: key is not
  562. returned because this would compromise security.
  563. */
  564. struct AuthGetSpecificIdentityInfoPB {
  565.     void *                            qLink;
  566.     long                             reserved1;
  567.     long                             reserved2;
  568.     AuthIOCompletionUPP             ioCompletion;
  569.     OSErr                             ioResult;
  570.     unsigned long                     saveA5;
  571.     short                             reqCode;
  572.     long                             reserved[2];
  573.     AddrBlock                         serverHint;
  574.     short                             dsRefNum;
  575.     unsigned long                     callID;
  576.     AuthIdentity                     identity;
  577.     long                             gReserved1;
  578.     long                             gReserved2;
  579.     long                             gReserved3;
  580.     long                             clientData;
  581.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  582.     RecordIDPtr                     userRecord;                    /* <--  OCE name(Record) of the user */
  583. };
  584. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  585.  
  586. /*
  587. kAuthAddKey:
  588. userRecord will contain the user information whose identity has to be
  589. created. userKey will point to the key to be created. password points to
  590. an RString containing the password used to generate the key.
  591. */
  592. struct AuthAddKeyPB {
  593.     void *                            qLink;
  594.     long                             reserved1;
  595.     long                             reserved2;
  596.     AuthIOCompletionUPP             ioCompletion;
  597.     OSErr                             ioResult;
  598.     unsigned long                     saveA5;
  599.     short                             reqCode;
  600.     long                             reserved[2];
  601.     AddrBlock                         serverHint;
  602.     short                             dsRefNum;
  603.     unsigned long                     callID;
  604.     AuthIdentity                     identity;
  605.     long                             gReserved1;
  606.     long                             gReserved2;
  607.     long                             gReserved3;
  608.     long                             clientData;
  609.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  610.     AuthKeyPtr                         userKey;                    /* <--  OCE Key for the user */
  611.     RStringPtr                         password;                    /*  --> Pointer to password string */
  612. };
  613. typedef struct AuthAddKeyPB AuthAddKeyPB;
  614.  
  615. /*
  616. kAuthChangeKey:
  617. userRecord will contain the user information whose identity has to be
  618. created. userKey will point to the key to be created. password points to
  619. an RString containing the password used to generate the key.
  620. */
  621. struct AuthChangeKeyPB {
  622.     void *                            qLink;
  623.     long                             reserved1;
  624.     long                             reserved2;
  625.     AuthIOCompletionUPP             ioCompletion;
  626.     OSErr                             ioResult;
  627.     unsigned long                     saveA5;
  628.     short                             reqCode;
  629.     long                             reserved[2];
  630.     AddrBlock                         serverHint;
  631.     short                             dsRefNum;
  632.     unsigned long                     callID;
  633.     AuthIdentity                     identity;
  634.     long                             gReserved1;
  635.     long                             gReserved2;
  636.     long                             gReserved3;
  637.     long                             clientData;
  638.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  639.     AuthKeyPtr                         userKey;                    /* <--  New OCE Key for the user */
  640.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  641. };
  642. typedef struct AuthChangeKeyPB AuthChangeKeyPB;
  643.  
  644. /*
  645. AuthDeleteKey:
  646. userRecord will contain the user information whose Key has to be deleted.
  647. */
  648. struct AuthDeleteKeyPB {
  649.     void *                            qLink;
  650.     long                             reserved1;
  651.     long                             reserved2;
  652.     AuthIOCompletionUPP             ioCompletion;
  653.     OSErr                             ioResult;
  654.     unsigned long                     saveA5;
  655.     short                             reqCode;
  656.     long                             reserved[2];
  657.     AddrBlock                         serverHint;
  658.     short                             dsRefNum;
  659.     unsigned long                     callID;
  660.     AuthIdentity                     identity;
  661.     long                             gReserved1;
  662.     long                             gReserved2;
  663.     long                             gReserved3;
  664.     long                             clientData;
  665.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  666. };
  667. typedef struct AuthDeleteKeyPB AuthDeleteKeyPB;
  668.  
  669. /* AuthPasswordToKey: Converts an RString into a key. */
  670. struct AuthPasswordToKeyPB {
  671.     void *                            qLink;
  672.     long                             reserved1;
  673.     long                             reserved2;
  674.     AuthIOCompletionUPP             ioCompletion;
  675.     OSErr                             ioResult;
  676.     unsigned long                     saveA5;
  677.     short                             reqCode;
  678.     long                             reserved[2];
  679.     AddrBlock                         serverHint;
  680.     short                             dsRefNum;
  681.     unsigned long                     callID;
  682.     AuthIdentity                     identity;
  683.     long                             gReserved1;
  684.     long                             gReserved2;
  685.     long                             gReserved3;
  686.     long                             clientData;
  687.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  688.     AuthKeyPtr                         key;                        /* <--  */
  689.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  690. };
  691. typedef struct AuthPasswordToKeyPB AuthPasswordToKeyPB;
  692.  
  693. /*
  694. kAuthGetCredentials:
  695. userRecord will contain the user information whose identity has to be
  696. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  697. be deleted.
  698. */
  699. struct AuthGetCredentialsPB {
  700.     void *                            qLink;
  701.     long                             reserved1;
  702.     long                             reserved2;
  703.     AuthIOCompletionUPP             ioCompletion;
  704.     OSErr                             ioResult;
  705.     unsigned long                     saveA5;
  706.     short                             reqCode;
  707.     long                             reserved[2];
  708.     AddrBlock                         serverHint;
  709.     short                             dsRefNum;
  710.     unsigned long                     callID;
  711.     AuthIdentity                     identity;
  712.     long                             gReserved1;
  713.     long                             gReserved2;
  714.     long                             gReserved3;
  715.     long                             clientData;
  716.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  717.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  718.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  719.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  720.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  721.     void *                            credentials;                /* <--  buffer where credentials are returned */
  722. };
  723. typedef struct AuthGetCredentialsPB AuthGetCredentialsPB;
  724.  
  725. /*
  726. AuthDecryptCredentialsPB:
  727. Changes:
  728. userKey is changed userIdentity.
  729. userRecord is changed to initiatorRecord. User must supply buffer
  730. to hold initiatorRecord.
  731. agentList has changed to agent. There wil be no call back.
  732. User must supply buffer to hold agent Record.
  733. An additional boolean parameter 'hasAgent' is included.
  734. Toolbox will set this if an 'Agent' record is found in the
  735. credentials. If RecordIDPtr is 'nil', no agent record will
  736. be copied. However user can examine 'hasAgent', If true user
  737. can reissue this call with apprpriate buffer for getting a recordID.
  738. agent has changed to intermediary.  User must supply buffer to hold 
  739. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  740. 'intermediary' record is found in the credentials. 
  741. */
  742. struct AuthDecryptCredentialsPB {
  743.     void *                            qLink;
  744.     long                             reserved1;
  745.     long                             reserved2;
  746.     AuthIOCompletionUPP             ioCompletion;
  747.     OSErr                             ioResult;
  748.     unsigned long                     saveA5;
  749.     short                             reqCode;
  750.     long                             reserved[2];
  751.     AddrBlock                         serverHint;
  752.     short                             dsRefNum;
  753.     unsigned long                     callID;
  754.     AuthIdentity                     identity;
  755.     long                             gReserved1;
  756.     long                             gReserved2;
  757.     long                             gReserved3;
  758.     long                             clientData;
  759.     AuthIdentity                     userIdentity;                /*  --> user's Identity */
  760.     RecordIDPtr                     initiatorRecord;            /* <--  OCE name of the initiator */
  761.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  762.     UTCTime                         expiry;                        /* <--  credentials expiry time */
  763.     unsigned long                     credentialsLength;            /*  --> actual credentials size */
  764.     void *                            credentials;                /*  --> credentials to be decrypted */
  765.     UTCTime                         issueTime;                    /* <--  credentials expiry time */
  766.     Boolean                         hasIntermediary;            /* <--  if true, An intermediary Record was found in credentials */
  767.     Boolean                         filler1;
  768.     RecordIDPtr                     intermediary;                /* <--  recordID of the intermediary */
  769. };
  770. typedef struct AuthDecryptCredentialsPB AuthDecryptCredentialsPB;
  771.  
  772. struct AuthMakeChallengePB {
  773.     void *                            qLink;
  774.     long                             reserved1;
  775.     long                             reserved2;
  776.     AuthIOCompletionUPP             ioCompletion;
  777.     OSErr                             ioResult;
  778.     unsigned long                     saveA5;
  779.     short                             reqCode;
  780.     long                             reserved[2];
  781.     AddrBlock                         serverHint;
  782.     short                             dsRefNum;
  783.     unsigned long                     callID;
  784.     AuthIdentity                     identity;
  785.     long                             gReserved1;
  786.     long                             gReserved2;
  787.     long                             gReserved3;
  788.     long                             clientData;
  789.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  790.     void *                            challenge;                    /* <--  Encrypted Challenge */
  791.     unsigned long                     challengeBufferLength;        /*  ->length of challenge buffer */
  792.     unsigned long                     challengeLength;            /*  <-length of Encrypted Challenge */
  793. };
  794. typedef struct AuthMakeChallengePB AuthMakeChallengePB;
  795.  
  796. struct AuthMakeReplyPB {
  797.     void *                            qLink;
  798.     long                             reserved1;
  799.     long                             reserved2;
  800.     AuthIOCompletionUPP             ioCompletion;
  801.     OSErr                             ioResult;
  802.     unsigned long                     saveA5;
  803.     short                             reqCode;
  804.     long                             reserved[2];
  805.     AddrBlock                         serverHint;
  806.     short                             dsRefNum;
  807.     unsigned long                     callID;
  808.     AuthIdentity                     identity;
  809.     long                             gReserved1;
  810.     long                             gReserved2;
  811.     long                             gReserved3;
  812.     long                             clientData;
  813.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  814.     void *                            challenge;                    /*  --> Encrypted Challenge */
  815.     void *                            reply;                        /* <--  Encrypted Reply */
  816.     unsigned long                     replyBufferLength;            /*  -->length of challenge buffer */
  817.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  818.     unsigned long                     replyLength;                /* <--  length of Encrypted Reply */
  819. };
  820. typedef struct AuthMakeReplyPB AuthMakeReplyPB;
  821.  
  822. struct AuthVerifyReplyPB {
  823.     void *                            qLink;
  824.     long                             reserved1;
  825.     long                             reserved2;
  826.     AuthIOCompletionUPP             ioCompletion;
  827.     OSErr                             ioResult;
  828.     unsigned long                     saveA5;
  829.     short                             reqCode;
  830.     long                             reserved[2];
  831.     AddrBlock                         serverHint;
  832.     short                             dsRefNum;
  833.     unsigned long                     callID;
  834.     AuthIdentity                     identity;
  835.     long                             gReserved1;
  836.     long                             gReserved2;
  837.     long                             gReserved3;
  838.     long                             clientData;
  839.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  840.     void *                            challenge;                    /*  --> Encrypted Challenge */
  841.     void *                            reply;                        /*  --> Encrypted Reply */
  842.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  843.     unsigned long                     replyLength;                /*  --> length of Encrypted Reply */
  844. };
  845. typedef struct AuthVerifyReplyPB AuthVerifyReplyPB;
  846.  
  847. /*
  848. kAuthGetUTCTime:
  849. RLI will contain a valid RLI for a cluster server.
  850. UTC(GMT) time from one of the cluster server will be returned.
  851. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  852. If RLI is nil Map DA is used to determine UTC(GMT).
  853. Mac Local Time = theUTCTime + theUTCOffset.
  854. */
  855. struct AuthGetUTCTimePB {
  856.     void *                            qLink;
  857.     long                             reserved1;
  858.     long                             reserved2;
  859.     AuthIOCompletionUPP             ioCompletion;
  860.     OSErr                             ioResult;
  861.     unsigned long                     saveA5;
  862.     short                             reqCode;
  863.     long                             reserved[2];
  864.     AddrBlock                         serverHint;
  865.     short                             dsRefNum;
  866.     unsigned long                     callID;
  867.     AuthIdentity                     identity;
  868.     long                             gReserved1;
  869.     long                             gReserved2;
  870.     long                             gReserved3;
  871.     long                             clientData;
  872.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI of the Node, whose server's UTC is requested */
  873.     UTCTime                         theUTCTime;                    /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  874.     UTCOffset                         theUTCOffset;                /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  875. };
  876. typedef struct AuthGetUTCTimePB AuthGetUTCTimePB;
  877.  
  878. /*
  879. kAuthMakeProxy:
  880. A user represented bu the 'userIdentity' can make a proxy using this call.
  881. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  882. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  883. 'firstValid' is time at which proxy becomes valid.
  884. 'expiry' is the time at which proxy must expire.
  885. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  886. When the call completes, it will hold the actual length of proxy. If the
  887. call completes 'kOCEMoreData' error, client can reissue the call with the
  888. buffer size as 'proxyLength' returned.
  889. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  890. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  891. for the server using TradeProxyForCredentials call.
  892. authDataLength and authData are intended for possible future work, but are
  893. ignored for now.
  894. */
  895. struct AuthMakeProxyPB {
  896.     void *                            qLink;
  897.     long                             reserved1;
  898.     long                             reserved2;
  899.     AuthIOCompletionUPP             ioCompletion;
  900.     OSErr                             ioResult;
  901.     unsigned long                     saveA5;
  902.     short                             reqCode;
  903.     long                             reserved[2];
  904.     AddrBlock                         serverHint;
  905.     short                             dsRefNum;
  906.     unsigned long                     callID;
  907.     AuthIdentity                     identity;
  908.     long                             gReserved1;
  909.     long                             gReserved2;
  910.     long                             gReserved3;
  911.     long                             clientData;
  912.     AuthIdentity                     userIdentity;                /*  --> identity of principal */
  913.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  914.     UTCTime                         firstValid;                    /*  --> time at which proxy becomes valid */
  915.     UTCTime                         expiry;                        /*  --> time at which proxy expires */
  916.     unsigned long                     authDataLength;                /*  --> size of authorization data */
  917.     void *                            authData;                    /*  --> pointer to authorization data */
  918.     unsigned long                     proxyLength;                /* <--> max/actual proxy size */
  919.     void *                            proxy;                        /* <--> buffer where proxy is returned */
  920.     RecordIDPtr                     intermediary;                /*  --> RecordID of intermediary */
  921. };
  922. typedef struct AuthMakeProxyPB AuthMakeProxyPB;
  923.  
  924. /*
  925. kAuthTradeProxyForCredentials:
  926. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  927. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  928. 'recipient' is the RecordID for whom credetials are requested.
  929. 'principal' is the RecordID of the user who created the proxy.
  930. 'proxyLength' is the length of data pointed by 'proxy.
  931. If the call is succesfull, credentials will be returned in the
  932. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  933. When call succeds this will have expiry time of credentials.
  934. This is very similar to GetCredentials except that we (of course) need the proxy,
  935. but we also need the name of the principal who created the proxy.
  936. */
  937. struct AuthTradeProxyForCredentialsPB {
  938.     void *                            qLink;
  939.     long                             reserved1;
  940.     long                             reserved2;
  941.     AuthIOCompletionUPP             ioCompletion;
  942.     OSErr                             ioResult;
  943.     unsigned long                     saveA5;
  944.     short                             reqCode;
  945.     long                             reserved[2];
  946.     AddrBlock                         serverHint;
  947.     short                             dsRefNum;
  948.     unsigned long                     callID;
  949.     AuthIdentity                     identity;
  950.     long                             gReserved1;
  951.     long                             gReserved2;
  952.     long                             gReserved3;
  953.     long                             clientData;
  954.     AuthIdentity                     userIdentity;                /*  --> identity of intermediary */
  955.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  956.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  957.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  958.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  959.     void *                            credentials;                /* <--> buffer where credentials are returned */
  960.     unsigned long                     proxyLength;                /*  --> actual proxy size */
  961.     void *                            proxy;                        /*  --> buffer containing proxy */
  962.     RecordIDPtr                     principal;                    /*  --> RecordID of principal */
  963. };
  964. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  965.  
  966. /* API for Local Identity Interface */
  967. /*
  968. AuthGetLocalIdentityPB:
  969. A Collaborative application intended to work under the umbrella of LocalIdentity
  970. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  971. If LocalIdentity has not been setup, then application will get
  972. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  973. recommended by the OCE Setup document and guide the user through OCE Setup.
  974. If the OCESetup contains local identity, but user has not unlocked, it will get
  975. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  976. to prompt user for the password.
  977. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  978. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  979. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  980. when a LocalIdentity gets created by a foreground application.
  981. */
  982. struct AuthGetLocalIdentityPB {
  983.     void *                            qLink;
  984.     long                             reserved1;
  985.     long                             reserved2;
  986.     AuthIOCompletionUPP             ioCompletion;
  987.     OSErr                             ioResult;
  988.     unsigned long                     saveA5;
  989.     short                             reqCode;
  990.     long                             reserved[2];
  991.     AddrBlock                         serverHint;
  992.     short                             dsRefNum;
  993.     unsigned long                     callID;
  994.     AuthIdentity                     identity;
  995.     long                             gReserved1;
  996.     long                             gReserved2;
  997.     long                             gReserved3;
  998.     long                             clientData;
  999.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1000. };
  1001. typedef struct AuthGetLocalIdentityPB AuthGetLocalIdentityPB;
  1002.  
  1003. /*
  1004. kAuthUnlockLocalIdentity:
  1005. The LocalIdentity can be created using this call.
  1006. The userName and password correspond to the LocalIdentity setup.
  1007. If the password matches, then collabIdentity will be returned.
  1008. Typically SDPPromptForLocalIdentity call will make this call.
  1009. All applications which are registered through kAuthAddToLocalIdentityQueue
  1010. will be notified.
  1011. */
  1012. struct AuthUnlockLocalIdentityPB {
  1013.     void *                            qLink;
  1014.     long                             reserved1;
  1015.     long                             reserved2;
  1016.     AuthIOCompletionUPP             ioCompletion;
  1017.     OSErr                             ioResult;
  1018.     unsigned long                     saveA5;
  1019.     short                             reqCode;
  1020.     long                             reserved[2];
  1021.     AddrBlock                         serverHint;
  1022.     short                             dsRefNum;
  1023.     unsigned long                     callID;
  1024.     AuthIdentity                     identity;
  1025.     long                             gReserved1;
  1026.     long                             gReserved2;
  1027.     long                             gReserved3;
  1028.     long                             clientData;
  1029.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1030.     RStringPtr                         userName;                    /*  --> userName */
  1031.     RStringPtr                         password;                    /*  -->user password */
  1032. };
  1033. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  1034.  
  1035. /*
  1036. kAuthLockLocalIdentity:
  1037. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1038. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1039. denied the operation. This name will be supplied by the application
  1040. when it registered through kAuthAddToLocalIdentityQueue call
  1041. */
  1042. struct AuthLockLocalIdentityPB {
  1043.     void *                            qLink;
  1044.     long                             reserved1;
  1045.     long                             reserved2;
  1046.     AuthIOCompletionUPP             ioCompletion;
  1047.     OSErr                             ioResult;
  1048.     unsigned long                     saveA5;
  1049.     short                             reqCode;
  1050.     long                             reserved[2];
  1051.     AddrBlock                         serverHint;
  1052.     short                             dsRefNum;
  1053.     unsigned long                     callID;
  1054.     AuthIdentity                     identity;
  1055.     long                             gReserved1;
  1056.     long                             gReserved2;
  1057.     long                             gReserved3;
  1058.     long                             clientData;
  1059.     LocalIdentity                     theLocalIdentity;            /*  --> LocalIdentity */
  1060.     StringPtr                         name;                        /* <--  name of the app which denied delete */
  1061. };
  1062. typedef struct AuthLockLocalIdentityPB AuthLockLocalIdentityPB;
  1063.  
  1064. typedef pascal Boolean (*NotificationProcPtr)(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  1065.  
  1066. #if GENERATINGCFM
  1067. typedef UniversalProcPtr NotificationUPP;
  1068. #else
  1069. typedef NotificationProcPtr NotificationUPP;
  1070. #endif
  1071. typedef NotificationUPP NotificationProc;
  1072. /*
  1073. kAuthAddToLocalIdentityQueue:
  1074. An application requiring notification of locking/unlocking of the
  1075. LocalIdentity can install itself using this call. The function provided
  1076. in 'notifyProc' will be called whenever the requested event happens.
  1077. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1078. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1079. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1080. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1081. (registered with the notificationProc) of the application which denied locking is also
  1082. returned to the caller making the AuthLockIdentity call.
  1083. */
  1084. struct AuthAddToLocalIdentityQueuePB {
  1085.     void *                            qLink;
  1086.     long                             reserved1;
  1087.     long                             reserved2;
  1088.     AuthIOCompletionUPP             ioCompletion;
  1089.     OSErr                             ioResult;
  1090.     unsigned long                     saveA5;
  1091.     short                             reqCode;
  1092.     long                             reserved[2];
  1093.     AddrBlock                         serverHint;
  1094.     short                             dsRefNum;
  1095.     unsigned long                     callID;
  1096.     AuthIdentity                     identity;
  1097.     long                             gReserved1;
  1098.     long                             gReserved2;
  1099.     long                             gReserved3;
  1100.     long                             clientData;
  1101.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1102.     AuthNotifications                 notifyFlags;                /*  --> notifyFlags */
  1103.     StringPtr                         appName;                    /*  --> name of application to be returned in Delete/Stop */
  1104. };
  1105. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  1106.  
  1107. /*kAuthRemoveFromLocalIdentityQueue:*/
  1108. struct AuthRemoveFromLocalIdentityQueuePB {
  1109.     void *                            qLink;
  1110.     long                             reserved1;
  1111.     long                             reserved2;
  1112.     AuthIOCompletionUPP             ioCompletion;
  1113.     OSErr                             ioResult;
  1114.     unsigned long                     saveA5;
  1115.     short                             reqCode;
  1116.     long                             reserved[2];
  1117.     AddrBlock                         serverHint;
  1118.     short                             dsRefNum;
  1119.     unsigned long                     callID;
  1120.     AuthIdentity                     identity;
  1121.     long                             gReserved1;
  1122.     long                             gReserved2;
  1123.     long                             gReserved3;
  1124.     long                             clientData;
  1125.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1126. };
  1127. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  1128.  
  1129. /*
  1130. kAuthSetupLocalIdentity:
  1131. The LocalIdentity can be Setup using this call.
  1132. The userName and password correspond to the LocalIdentity setup.
  1133. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1134. will be returned.
  1135. */
  1136. struct AuthSetupLocalIdentityPB {
  1137.     void *                            qLink;
  1138.     long                             reserved1;
  1139.     long                             reserved2;
  1140.     AuthIOCompletionUPP             ioCompletion;
  1141.     OSErr                             ioResult;
  1142.     unsigned long                     saveA5;
  1143.     short                             reqCode;
  1144.     long                             reserved[2];
  1145.     AddrBlock                         serverHint;
  1146.     short                             dsRefNum;
  1147.     unsigned long                     callID;
  1148.     AuthIdentity                     identity;
  1149.     long                             gReserved1;
  1150.     long                             gReserved2;
  1151.     long                             gReserved3;
  1152.     long                             clientData;
  1153.     long                             aReserved;                    /*  --  */
  1154.     RStringPtr                         userName;                    /*  --> userName */
  1155.     RStringPtr                         password;                    /*  -->user password */
  1156. };
  1157. typedef struct AuthSetupLocalIdentityPB AuthSetupLocalIdentityPB;
  1158.  
  1159. /*
  1160. kAuthChangeLocalIdentity:
  1161. An existing LocalIdentity  Setup can be changed using this call.
  1162. The userName and password correspond to the LocalIdentity setup.
  1163. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1164. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1165. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1166. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1167. password as 'newPassword' and if any applications has installed into 
  1168. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1169. kAuthLocalIdentityNameChangeOp action value. 
  1170.  
  1171. */
  1172. struct AuthChangeLocalIdentityPB {
  1173.     void *                            qLink;
  1174.     long                             reserved1;
  1175.     long                             reserved2;
  1176.     AuthIOCompletionUPP             ioCompletion;
  1177.     OSErr                             ioResult;
  1178.     unsigned long                     saveA5;
  1179.     short                             reqCode;
  1180.     long                             reserved[2];
  1181.     AddrBlock                         serverHint;
  1182.     short                             dsRefNum;
  1183.     unsigned long                     callID;
  1184.     AuthIdentity                     identity;
  1185.     long                             gReserved1;
  1186.     long                             gReserved2;
  1187.     long                             gReserved3;
  1188.     long                             clientData;
  1189.     long                             aReserved;                    /*  --  */
  1190.     RStringPtr                         userName;                    /*  --> userName */
  1191.     RStringPtr                         password;                    /*  --> current password */
  1192.     RStringPtr                         newPassword;                /*  --> new password */
  1193. };
  1194. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  1195.  
  1196. /*
  1197. kAuthRemoveLocalIdentity:
  1198. An existing LocalIdentity  Setup can be removed using this call.
  1199. The userName and password correspond to the LocalIdentity setup.
  1200. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1201. will be returned.
  1202. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1203. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1204. This is a very distructive operation, user must be warned enough before actually making
  1205. this call.
  1206. */
  1207. struct AuthRemoveLocalIdentityPB {
  1208.     void *                            qLink;
  1209.     long                             reserved1;
  1210.     long                             reserved2;
  1211.     AuthIOCompletionUPP             ioCompletion;
  1212.     OSErr                             ioResult;
  1213.     unsigned long                     saveA5;
  1214.     short                             reqCode;
  1215.     long                             reserved[2];
  1216.     AddrBlock                         serverHint;
  1217.     short                             dsRefNum;
  1218.     unsigned long                     callID;
  1219.     AuthIdentity                     identity;
  1220.     long                             gReserved1;
  1221.     long                             gReserved2;
  1222.     long                             gReserved3;
  1223.     long                             clientData;
  1224.     long                             aReserved;                    /*  --  */
  1225.     RStringPtr                         userName;                    /*  --> userName */
  1226.     RStringPtr                         password;                    /*  --> current password */
  1227. };
  1228. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  1229.  
  1230. /*
  1231. kOCESetupAddDirectoryInfo:
  1232. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1233. ASCreateLocalIdentity should have been done succesfully before making this call.    
  1234. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1235. DirAddDSAMDirectory call was made.
  1236. rid-> is the recordID in which the identity for the catalog will be established.
  1237. password-> the password associated with the rid in the catalog world.
  1238. */
  1239. struct OCESetupAddDirectoryInfoPB {
  1240.     void *                            qLink;
  1241.     long                             reserved1;
  1242.     long                             reserved2;
  1243.     AuthIOCompletionUPP             ioCompletion;
  1244.     OSErr                             ioResult;
  1245.     unsigned long                     saveA5;
  1246.     short                             reqCode;
  1247.     long                             reserved[2];
  1248.     AddrBlock                         serverHint;
  1249.     short                             dsRefNum;
  1250.     unsigned long                     callID;
  1251.     AuthIdentity                     identity;
  1252.     long                             gReserved1;
  1253.     long                             gReserved2;
  1254.     long                             gReserved3;
  1255.     long                             clientData;
  1256.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1257.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1258.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1259. };
  1260. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  1261.  
  1262. /*
  1263. kOCESetupChangeDirectoryInfo:
  1264. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1265. can be changed.
  1266. ASCreateLocalIdentity should have been done succesfully before making this call.
  1267. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1268. DirAddDSAMDirectory call was made.
  1269. rid-> is the recordID in which the identity for the catalog will be established.
  1270. password-> the password associated with the rid in the catalog world.
  1271. newPassword -> the new password for the catalog
  1272. */
  1273. struct OCESetupChangeDirectoryInfoPB {
  1274.     void *                            qLink;
  1275.     long                             reserved1;
  1276.     long                             reserved2;
  1277.     AuthIOCompletionUPP             ioCompletion;
  1278.     OSErr                             ioResult;
  1279.     unsigned long                     saveA5;
  1280.     short                             reqCode;
  1281.     long                             reserved[2];
  1282.     AddrBlock                         serverHint;
  1283.     short                             dsRefNum;
  1284.     unsigned long                     callID;
  1285.     AuthIdentity                     identity;
  1286.     long                             gReserved1;
  1287.     long                             gReserved2;
  1288.     long                             gReserved3;
  1289.     long                             clientData;
  1290.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1291.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1292.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1293.     RStringPtr                         newPassword;                /*  --> new password in the catalog */
  1294. };
  1295. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  1296.  
  1297. /*
  1298. kOCESetupRemoveDirectoryInfo:
  1299. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1300. can be changed.
  1301. ASCreateLocalIdentity should have been done succesfully before making this call.
  1302. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1303. */
  1304. struct OCESetupRemoveDirectoryInfoPB {
  1305.     void *                            qLink;
  1306.     long                             reserved1;
  1307.     long                             reserved2;
  1308.     AuthIOCompletionUPP             ioCompletion;
  1309.     OSErr                             ioResult;
  1310.     unsigned long                     saveA5;
  1311.     short                             reqCode;
  1312.     long                             reserved[2];
  1313.     AddrBlock                         serverHint;
  1314.     short                             dsRefNum;
  1315.     unsigned long                     callID;
  1316.     AuthIdentity                     identity;
  1317.     long                             gReserved1;
  1318.     long                             gReserved2;
  1319.     long                             gReserved3;
  1320.     long                             clientData;
  1321.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1322. };
  1323. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  1324.  
  1325. /*
  1326. kOCESetupGetDirectoryInfo:
  1327. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1328. can be obtained.
  1329. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1330. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1331. 'password' will be returned  for  non-ADAP Catalogs.
  1332. */
  1333. struct OCESetupGetDirectoryInfoPB {
  1334.     void *                            qLink;
  1335.     long                             reserved1;
  1336.     long                             reserved2;
  1337.     AuthIOCompletionUPP             ioCompletion;
  1338.     OSErr                             ioResult;
  1339.     unsigned long                     saveA5;
  1340.     short                             reqCode;
  1341.     long                             reserved[2];
  1342.     AddrBlock                         serverHint;
  1343.     short                             dsRefNum;
  1344.     unsigned long                     callID;
  1345.     AuthIdentity                     identity;
  1346.     long                             gReserved1;
  1347.     long                             gReserved2;
  1348.     long                             gReserved3;
  1349.     long                             clientData;
  1350.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  1351.     DirDiscriminator                 discriminator;                /*  --> discriminator for the catalog */
  1352.     RecordIDPtr                     recordID;                    /* <--  rid for the catalog identity */
  1353.     RStringPtr                         nativeName;                    /* <--  user name in the catalog world */
  1354.     RStringPtr                         password;                    /* <--  password in the catalog world */
  1355. };
  1356. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1357.  
  1358. /*
  1359. ****************************************************************************
  1360.  
  1361.  
  1362.          Catalog Manager operations
  1363.  
  1364.  
  1365. ****************************************************************************
  1366. */
  1367. typedef union DirParamBlock DirParamBlock;
  1368. typedef DirParamBlock *DirParamBlockPtr;
  1369. /*
  1370.         This ProcPtr uses register based parameters on the 68k and cannot
  1371.         be written in or called from a high-level language without the help of
  1372.         mixed mode or assembly glue.
  1373.  
  1374.             typedef pascal void (*DirIOCompletionProcPtr)(DirParamBlockPtr paramBlock);
  1375.  
  1376. */
  1377.  
  1378. #if GENERATINGCFM
  1379. typedef UniversalProcPtr DirIOCompletionUPP;
  1380. #else
  1381. typedef Register68kProcPtr DirIOCompletionUPP;
  1382. #endif
  1383. /* AddRecord */
  1384. struct DirAddRecordPB {
  1385.     void *                            qLink;
  1386.     long                             reserved1;
  1387.     long                             reserved2;
  1388.     DirIOCompletionUPP                 ioCompletion;
  1389.     OSErr                             ioResult;
  1390.     unsigned long                     saveA5;
  1391.     short                             reqCode;
  1392.     long                             reserved[2];
  1393.     AddrBlock                         serverHint;
  1394.     short                             dsRefNum;
  1395.     unsigned long                     callID;
  1396.     AuthIdentity                     identity;
  1397.     long                             gReserved1;
  1398.     long                             gReserved2;
  1399.     long                             gReserved3;
  1400.     long                             clientData;
  1401.     RecordIDPtr                     aRecord;                    /*  --> CreationID returned here */
  1402.     Boolean                         allowDuplicate;                /*  --> */
  1403.     Boolean                         filler1;
  1404. };
  1405. typedef struct DirAddRecordPB DirAddRecordPB;
  1406.  
  1407. /* DeleteRecord */
  1408. struct DirDeleteRecordPB {
  1409.     void *                            qLink;
  1410.     long                             reserved1;
  1411.     long                             reserved2;
  1412.     DirIOCompletionUPP                 ioCompletion;
  1413.     OSErr                             ioResult;
  1414.     unsigned long                     saveA5;
  1415.     short                             reqCode;
  1416.     long                             reserved[2];
  1417.     AddrBlock                         serverHint;
  1418.     short                             dsRefNum;
  1419.     unsigned long                     callID;
  1420.     AuthIdentity                     identity;
  1421.     long                             gReserved1;
  1422.     long                             gReserved2;
  1423.     long                             gReserved3;
  1424.     long                             clientData;
  1425.     RecordIDPtr                     aRecord;                    /*  --> */
  1426. };
  1427. typedef struct DirDeleteRecordPB DirDeleteRecordPB;
  1428.  
  1429. /* aRecord must contain valid PackedRLI and a CreationID. */
  1430. /**********************************************************************************/
  1431. /*
  1432. DirEnumerate:
  1433. This call can be used to enumerate both DNodes and records under a specified
  1434. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1435.  
  1436. startingPoint indicates where to start the enumeration.  Initially,
  1437. it should be set to a value of nil.  After some records are enumerated,
  1438. the client can issue the call again with the same aRLI and recordName and
  1439. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1440. will continue the enumeration from that record on. if user wants to get back the
  1441. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1442. must be set to 'true'. If this is set to 'false', records specified after the
  1443. startingPoint record will be returned.
  1444.  
  1445. sortBy indicates to the server to return the records that match in name-first
  1446. or type-first order.  sortDirection indicates to the server to search in forward
  1447. or backward sort order for RecordIDs Specified.
  1448.  
  1449. RecordIDS and Enumeration Criteria:
  1450.  
  1451. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1452. specification.
  1453.  
  1454. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1455. specify a wild card in the name. WildCard specification is specified in 
  1456. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1457.  
  1458. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1459.  
  1460. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1461.  
  1462. If 'typeCount' is exactly equal to one, a wild card can be specified
  1463. for the entity type; otherwise types have to be completely specified.
  1464. WildCard specification is specified in  matchNameHow parameter
  1465.  and possible values are defined in DirMatchWith Enum.
  1466.  
  1467.  
  1468. A nil value for 'startingPoint' is allowed when sortDirection specified
  1469. is 'kSortBackwards'. This was not allowed previously.
  1470.  
  1471. 'enumFlags' parameter is a bit field. The following bits can be set:
  1472.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1473.     kEnumAliasMask to get back record aliases
  1474.     kEnumPseudonymMask to get back record pseudonyms
  1475.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1476.     'aRLI' parameter.
  1477.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1478.     dNode specified in the 'aRLI' parameter.
  1479.  
  1480.     kEnumAll is combination of all five values and can be used to enumerate
  1481.     everything under a specified DNode.
  1482.  
  1483.  
  1484.  
  1485. The results returned for each element will consist of a DirEnumSpec.
  1486. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1487. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1488. The 'enumFlag'  will indicate whether the returned element is a
  1489. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1490. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1491. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1492. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1493. this will be set to zero). The name will be the child dnode name. For other values of the
  1494. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1495. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1496. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1497. may also return the relative position of the record (percentile of total records) in the 
  1498. indexRatio field in EnumSpec.
  1499.  
  1500.  
  1501. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1502. The results will be collected in the 'getBuffer' supplied by the user.
  1503. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1504.  
  1505. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1506. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1507. */
  1508. struct DirEnumerateGetPB {
  1509.     void *                            qLink;
  1510.     long                             reserved1;
  1511.     long                             reserved2;
  1512.     DirIOCompletionUPP                 ioCompletion;
  1513.     OSErr                             ioResult;
  1514.     unsigned long                     saveA5;
  1515.     short                             reqCode;
  1516.     long                             reserved[2];
  1517.     AddrBlock                         serverHint;
  1518.     short                             dsRefNum;
  1519.     unsigned long                     callID;
  1520.     AuthIdentity                     identity;
  1521.     long                             gReserved1;
  1522.     long                             gReserved2;
  1523.     long                             gReserved3;
  1524.     long                             clientData;
  1525.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1526.     DirEnumSpec *                    startingPoint;                /*  --> */
  1527.     DirSortOption                     sortBy;                        /*  --> */
  1528.     DirSortDirection                 sortDirection;                /*  --> */
  1529.     long                             dReserved;                    /*  --  */
  1530.     RStringPtr                         nameMatchString;            /*  --> name from which enumeration should start */
  1531.     RStringPtr *                    typesList;                    /*  --> list of entity types to be enumerated */
  1532.     unsigned long                     typeCount;                    /*  --> number of types in the list */
  1533.     DirEnumChoices                     enumFlags;                    /*  --> indicates what to enumerate */
  1534.     Boolean                         includeStartingPoint;        /*  --> if true return the record specified in starting point */
  1535.     Byte                             padByte;
  1536.     DirMatchWith                     matchNameHow;                /*  --> Matching Criteria for nameMatchString */
  1537.     DirMatchWith                     matchTypeHow;                /*  --> Matching Criteria for typeList */
  1538.     void *                            getBuffer;                    /*  --> */
  1539.     unsigned long                     getBufferSize;                /*  --> */
  1540.     SLRV                             responseSLRV;                /*  <--  response SLRV */
  1541. };
  1542. typedef struct DirEnumerateGetPB DirEnumerateGetPB;
  1543.  
  1544. /* The EnumerateRecords call-back function is defined as follows: */
  1545. typedef pascal Boolean (*ForEachDirEnumSpecProcPtr)(long clientData, const DirEnumSpec *enumSpec);
  1546.  
  1547. #if GENERATINGCFM
  1548. typedef UniversalProcPtr ForEachDirEnumSpecUPP;
  1549. #else
  1550. typedef ForEachDirEnumSpecProcPtr ForEachDirEnumSpecUPP;
  1551. #endif
  1552. typedef ForEachDirEnumSpecUPP ForEachDirEnumSpec;
  1553. /*
  1554. EnumerateParse:
  1555. After an EnumerateGet call has completed, call EnumerateParse
  1556. to parse through the buffer that was filled in EnumerateGet.
  1557.  
  1558. 'eachEnumSpec' will be called each time to return to the client a
  1559. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1560. of information returned in the DirEnumSpec
  1561. The clientData parameter that you pass in the parameter block will be passed
  1562. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1563. to allow you some way to match the call-back to the original call (for
  1564. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1565. associate returned results in some way).
  1566.  
  1567. The client should return FALSE from 'eachEnumSpec' to continue
  1568. processing of the EnumerateParse request.  Returning TRUE will
  1569. terminate the EnumerateParse request.
  1570.  
  1571. For synchronous calls, the call-back routine actually runs as part of the same thread
  1572. of execution as the thread that made the EnumerateParse call.  That means that the
  1573. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1574. that were in effect when the call was made.  Because of this, the call-back
  1575. routine has the same restrictions as the caller of EnumerateParse:
  1576. if EnumerateParse was not called from interrupt level, then the call-
  1577. back routine can allocate memory. For asynchronous calls, call-back routine is
  1578. like a ioCompletion except that A5 will be preserved for the application.
  1579. */
  1580. struct DirEnumerateParsePB {
  1581.     void *                            qLink;
  1582.     long                             reserved1;
  1583.     long                             reserved2;
  1584.     DirIOCompletionUPP                 ioCompletion;
  1585.     OSErr                             ioResult;
  1586.     unsigned long                     saveA5;
  1587.     short                             reqCode;
  1588.     long                             reserved[2];
  1589.     AddrBlock                         serverHint;
  1590.     short                             dsRefNum;
  1591.     unsigned long                     callID;
  1592.     AuthIdentity                     identity;
  1593.     long                             gReserved1;
  1594.     long                             gReserved2;
  1595.     long                             gReserved3;
  1596.     long                             clientData;
  1597.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1598.     long                             bReserved;                    /*  --  */
  1599.     long                             cReserved;                    /*  --  */
  1600.     ForEachDirEnumSpec                 eachEnumSpec;                /*  --> */
  1601.     long                             eReserved;                    /*  --  */
  1602.     long                             fReserved;                    /*  --  */
  1603.     long                             gReserved;                    /*  --  */
  1604.     long                             hReserved;                    /*  --  */
  1605.     long                             iReserved;                    /*  --  */
  1606.     void *                            getBuffer;                    /*  --> */
  1607.     unsigned long                     getBufferSize;                /*  --> */
  1608.     short                             l1Reserved;                    /*  -- */
  1609.     short                             l2Reserved;                    /*  --  */
  1610.     short                             l3Reserved;                    /*  -- */
  1611.     short                             l4Reserved;                    /*  --  */
  1612.  
  1613. };
  1614. typedef struct DirEnumerateParsePB DirEnumerateParsePB;
  1615.  
  1616. /*
  1617.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1618.  * of records instead of records local to a cluster.
  1619. */
  1620. struct DirFindRecordGetPB {
  1621.     void *                            qLink;
  1622.     long                             reserved1;
  1623.     long                             reserved2;
  1624.     DirIOCompletionUPP                 ioCompletion;
  1625.     OSErr                             ioResult;
  1626.     unsigned long                     saveA5;
  1627.     short                             reqCode;
  1628.     long                             reserved[2];
  1629.     AddrBlock                         serverHint;
  1630.     short                             dsRefNum;
  1631.     unsigned long                     callID;
  1632.     AuthIdentity                     identity;
  1633.     long                             gReserved1;
  1634.     long                             gReserved2;
  1635.     long                             gReserved3;
  1636.     long                             clientData;
  1637.     RecordIDPtr                     startingPoint;
  1638.     long                             reservedA[2];
  1639.     RStringPtr                         nameMatchString;
  1640.     RStringPtr *                    typesList;
  1641.     unsigned long                     typeCount;
  1642.     long                             reservedB;
  1643.     short                             reservedC;
  1644.     DirMatchWith                     matchNameHow;
  1645.     DirMatchWith                     matchTypeHow;
  1646.     void *                            getBuffer;
  1647.     unsigned long                     getBufferSize;
  1648.     DirectoryNamePtr                 directoryName;
  1649.     DirDiscriminator                 discriminator;
  1650. };
  1651. typedef struct DirFindRecordGetPB DirFindRecordGetPB;
  1652.  
  1653. /* The FindRecordParse call-back function is defined as follows: */
  1654. typedef pascal Boolean (*ForEachRecordProcPtr)(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1655.  
  1656. #if GENERATINGCFM
  1657. typedef UniversalProcPtr ForEachRecordUPP;
  1658. #else
  1659. typedef ForEachRecordProcPtr ForEachRecordUPP;
  1660. #endif
  1661. typedef ForEachRecordUPP ForEachRecord;
  1662. /*
  1663.  * This PB same as DirFindRecordGet except it includes the callback function
  1664. */
  1665. struct DirFindRecordParsePB {
  1666.     void *                            qLink;
  1667.     long                             reserved1;
  1668.     long                             reserved2;
  1669.     DirIOCompletionUPP                 ioCompletion;
  1670.     OSErr                             ioResult;
  1671.     unsigned long                     saveA5;
  1672.     short                             reqCode;
  1673.     long                             reserved[2];
  1674.     AddrBlock                         serverHint;
  1675.     short                             dsRefNum;
  1676.     unsigned long                     callID;
  1677.     AuthIdentity                     identity;
  1678.     long                             gReserved1;
  1679.     long                             gReserved2;
  1680.     long                             gReserved3;
  1681.     long                             clientData;
  1682.     RecordIDPtr                     startingPoint;
  1683.     long                             reservedA[2];
  1684.     RStringPtr                         nameMatchString;
  1685.     RStringPtr *                    typesList;
  1686.     unsigned long                     typeCount;
  1687.     long                             reservedB;
  1688.     short                             reservedC;
  1689.     DirMatchWith                     matchNameHow;
  1690.     DirMatchWith                     matchTypeHow;
  1691.     void *                            getBuffer;
  1692.     unsigned long                     getBufferSize;
  1693.     DirectoryNamePtr                 directoryName;
  1694.     DirDiscriminator                 discriminator;
  1695.     ForEachRecord                     forEachRecordFunc;
  1696.  
  1697. };
  1698. typedef struct DirFindRecordParsePB DirFindRecordParsePB;
  1699.  
  1700. /*
  1701. LookupGet:
  1702.  
  1703. aRecordList is an array of pointers to RecordIDs, each of which must
  1704. contain valid PackedRLI and a CreationID.  recordIDCount is
  1705. the size of this array.
  1706.  
  1707. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1708. the size of this array.
  1709.  
  1710. staringRecordIndex is the record from which to continue the lookup.
  1711. If you want to start from first record in the list, this must be 1 (not zero).
  1712. This value must always be <= recordIDCount.
  1713.  
  1714. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1715. If you want to start from first attribute in the list, this must be 1 (not zero).
  1716. This value must always be <= attrTypeCount.
  1717.  
  1718. startingAttribute is the value of the attribute value from which we want to
  1719. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1720. may contain only a CID. Other catalogs may require the entire value.
  1721. If a non-null cid is given and if an attribute value with that cid is not found, this
  1722. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1723. after getting this error.
  1724.  
  1725. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1726. startingPoint in the results returned. If this is set to 'false', the value
  1727. specified in the startingAttribute will not be returned.
  1728.  
  1729. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1730. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1731. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1732. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1733. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1734. so they can be used in a subsequent LookupGet call to continue the lookup.
  1735.  
  1736. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1737. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1738. into the buffer, the client will not able to proceed further because he will not know the
  1739. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1740. would be needed for the next call to get this 'mondo' attribute value successfully.
  1741.  
  1742. to support this, LookupParse call will do the following:
  1743.  
  1744. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1745. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1746. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1747. However, if it was not even called once, then the attribute value may be too big to fit in the
  1748. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1749. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1750. ForEachAttributeValue was not called because the user does not have read access to some of
  1751. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1752. any of the attribute values.  A kOCEMoreData error is returned.
  1753.  
  1754. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1755. 'daDuplicateRecordIDErr'.
  1756.  
  1757. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1758. return 'daDuplicateAttrTypeErr'.
  1759. */
  1760. struct DirLookupGetPB {
  1761.     void *                            qLink;
  1762.     long                             reserved1;
  1763.     long                             reserved2;
  1764.     DirIOCompletionUPP                 ioCompletion;
  1765.     OSErr                             ioResult;
  1766.     unsigned long                     saveA5;
  1767.     short                             reqCode;
  1768.     long                             reserved[2];
  1769.     AddrBlock                         serverHint;
  1770.     short                             dsRefNum;
  1771.     unsigned long                     callID;
  1772.     AuthIdentity                     identity;
  1773.     long                             gReserved1;
  1774.     long                             gReserved2;
  1775.     long                             gReserved3;
  1776.     long                             clientData;
  1777.     RecordIDPtr *                    aRecordList;                /*  --> an array of RecordID pointers */
  1778.     AttributeTypePtr *                attrTypeList;                /*  --> an array of attribute types */
  1779.     long                             cReserved;                    /*  --  */
  1780.     long                             dReserved;                    /*  --  */
  1781.     long                             eReserved;                    /*  --  */
  1782.     long                             fReserved;                    /*  --  */
  1783.     unsigned long                     recordIDCount;                /*  --> */
  1784.     unsigned long                     attrTypeCount;                /*  --> */
  1785.     Boolean                         includeStartingPoint;        /*  --> if true return the value specified by the starting indices */
  1786.     Byte                             padByte;
  1787.     short                             i1Reserved;                    /*  --  */
  1788.     void *                            getBuffer;                    /*  --> */
  1789.     unsigned long                     getBufferSize;                /*  --> */
  1790.     unsigned long                     startingRecordIndex;        /*  --> start from this record */
  1791.     unsigned long                     startingAttrTypeIndex;        /*  --> start from this attribute type */
  1792.     Attribute                         startingAttribute;            /*  --> start from this attribute value */
  1793.     long                             pReserved;                    /*  --  */
  1794. };
  1795. typedef struct DirLookupGetPB DirLookupGetPB;
  1796.  
  1797. /* The Lookup call-back functions are defined as follows: */
  1798. typedef pascal Boolean (*ForEachLookupRecordIDProcPtr)(long clientData, const RecordID *recordID);
  1799.  
  1800. #if GENERATINGCFM
  1801. typedef UniversalProcPtr ForEachLookupRecordIDUPP;
  1802. #else
  1803. typedef ForEachLookupRecordIDProcPtr ForEachLookupRecordIDUPP;
  1804. #endif
  1805. typedef ForEachLookupRecordIDUPP ForEachLookupRecordID;
  1806. typedef pascal Boolean (*ForEachAttrTypeLookupProcPtr)(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1807.  
  1808. #if GENERATINGCFM
  1809. typedef UniversalProcPtr ForEachAttrTypeLookupUPP;
  1810. #else
  1811. typedef ForEachAttrTypeLookupProcPtr ForEachAttrTypeLookupUPP;
  1812. #endif
  1813. typedef ForEachAttrTypeLookupUPP ForEachAttrTypeLookup;
  1814. typedef pascal Boolean (*ForEachAttrValueProcPtr)(long clientData, const Attribute *attribute);
  1815.  
  1816. #if GENERATINGCFM
  1817. typedef UniversalProcPtr ForEachAttrValueUPP;
  1818. #else
  1819. typedef ForEachAttrValueProcPtr ForEachAttrValueUPP;
  1820. #endif
  1821. typedef ForEachAttrValueUPP ForEachAttrValue;
  1822. /*
  1823. LookupParse:
  1824.  
  1825. After a LookupGet call has completed, call LookupParse
  1826. to parse through the buffer that was filled in LookupGet.  The
  1827. toolbox will parse through the buffer and call the appropriate call-back routines
  1828. for each item in the getBuffer.
  1829.  
  1830. 'eachRecordID' will be called each time to return to the client one of the
  1831. RecordIDs from aRecordList.  The clientData parameter that you
  1832. pass in the parameter block will be passed to eachRecordID.
  1833. You are free to put anything in clientData - it is intended to allow
  1834. you some way to match the call-back to the original call (in case, for
  1835. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1836. want to get a call-back for each RecordID (for example, if you're looking up
  1837. attributes for only one RecordID), pass nil for eachRecordID.
  1838.  
  1839. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1840. attribute type (one from attrTypeList) that exists in the record specified
  1841. in the last eachRecordID call.  If you don't want to get a call-back for
  1842. each AttributeType (for example, if you're looking up only one attribute type,
  1843. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1844. call-back routine), pass nil for eachAttrType. However access controls may
  1845. prohibit you from reading some attribute types; in that case eachAttrValue
  1846. may not be called even though the value exists. Hence the client should
  1847. supply this call-back function to see the access controls for each attribute type.
  1848.  
  1849. This will be followed by one or more calls to eachAttrValue, to pass the
  1850. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1851. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1852. the value, and you can process it within the call-back routine.
  1853. After one or more values are returned, eachAttrType may be called again to pass
  1854. another attribute type that exists in the last-specified RecordID.
  1855.  
  1856. The client should return FALSE from eachRecordID, eachAttrType, and
  1857. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1858. from any call-back will terminate the LookupParse request.
  1859.  
  1860. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1861. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1862. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1863. However, if it was not even called once, then the attribute value may be too big to fit in the
  1864. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1865. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1866. ForEachAttributeValue was not called because the user does not have read access to some of
  1867. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1868. any of the attribute values.  A kOCEMoreData error is returned.
  1869.  
  1870. For synchronous calls, the call-back routine actually runs as part of the same thread
  1871. of execution as the thread that made the LookupParse call.  That means that the
  1872. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1873. that were in effect when the call was made.  Because of this, the call-back
  1874. routine has the same restrictions as the caller of LookupParse:
  1875. if LookupParse was not called from interrupt level, then the call-
  1876. back routine can allocate memory. For asynchronous calls, call-back routine is
  1877. like a ioCompletion except that A5 will be preserved for the application.
  1878. */
  1879. struct DirLookupParsePB {
  1880.     void *                            qLink;
  1881.     long                             reserved1;
  1882.     long                             reserved2;
  1883.     DirIOCompletionUPP                 ioCompletion;
  1884.     OSErr                             ioResult;
  1885.     unsigned long                     saveA5;
  1886.     short                             reqCode;
  1887.     long                             reserved[2];
  1888.     AddrBlock                         serverHint;
  1889.     short                             dsRefNum;
  1890.     unsigned long                     callID;
  1891.     AuthIdentity                     identity;
  1892.     long                             gReserved1;
  1893.     long                             gReserved2;
  1894.     long                             gReserved3;
  1895.     long                             clientData;
  1896.     RecordIDPtr *                    aRecordList;                /*  --> must be same from the corresponding Get call */
  1897.     AttributeTypePtr *                attrTypeList;                /*  --> must be same from the corresponding Get call */
  1898.     long                             cReserved;                    /*  --  */
  1899.     ForEachLookupRecordID             eachRecordID;                /*  --> */
  1900.     ForEachAttrTypeLookup             eachAttrType;                /*  --> */
  1901.     ForEachAttrValue                 eachAttrValue;                /*  --> */
  1902.     unsigned long                     recordIDCount;                /*  --> must be same from the corresponding Get call */
  1903.     unsigned long                     attrTypeCount;                /*  --> must be same from the corresponding Get call */
  1904.     long                             iReserved;                    /*  --  */
  1905.     void *                            getBuffer;                    /*  --> must be same from the corresponding Get call*/
  1906.     unsigned long                     getBufferSize;                /*  --> must be same from the corresponding Get call*/
  1907.     unsigned long                     lastRecordIndex;            /* <--  last RecordID processed when parse completed */
  1908.     unsigned long                     lastAttributeIndex;            /* <--  last Attribute Type processed when parse completed */
  1909.     Attribute                         lastAttribute;                /* <--  last attribute value (with this CreationID) processed when parse completed */
  1910.     unsigned long                     attrSize;                    /* <--  length of the attribute we did not return */
  1911. };
  1912. typedef struct DirLookupParsePB DirLookupParsePB;
  1913.  
  1914. /* AddAttributeValue */
  1915. struct DirAddAttributeValuePB {
  1916.     void *                            qLink;
  1917.     long                             reserved1;
  1918.     long                             reserved2;
  1919.     DirIOCompletionUPP                 ioCompletion;
  1920.     OSErr                             ioResult;
  1921.     unsigned long                     saveA5;
  1922.     short                             reqCode;
  1923.     long                             reserved[2];
  1924.     AddrBlock                         serverHint;
  1925.     short                             dsRefNum;
  1926.     unsigned long                     callID;
  1927.     AuthIdentity                     identity;
  1928.     long                             gReserved1;
  1929.     long                             gReserved2;
  1930.     long                             gReserved3;
  1931.     long                             clientData;
  1932.     RecordIDPtr                     aRecord;                    /*  --> */
  1933.     AttributePtr                     attr;                        /*  --> AttributeCreationID returned here */
  1934. };
  1935. typedef struct DirAddAttributeValuePB DirAddAttributeValuePB;
  1936.  
  1937. /*
  1938. aRecord must contain valid PackedRLI and a CreationID.
  1939.  
  1940. Instead of passing type, length, and value in three separate
  1941. fields, we take a pointer to an Attribute structure that contains
  1942. all three, and has room for the AttributeCreationNumber.
  1943. The AttributeCreationID will be returned in the attr itself.
  1944.  
  1945. The AttributeTag tells the catalog service that the attribute is an RString,
  1946. binary, or a RecordID.
  1947. */
  1948. /*
  1949. DeleteAttributeType:
  1950. This call is provided so that an existing AttributeType can be deleted.
  1951. If any attribute values exist for this type, they will all be deleted
  1952. (if the user has access rights to delete the values) and then the attribute type
  1953. will be deleted. Otherwise dsAccessDenied error will be returned.
  1954. */
  1955. struct DirDeleteAttributeTypePB {
  1956.     void *                            qLink;
  1957.     long                             reserved1;
  1958.     long                             reserved2;
  1959.     DirIOCompletionUPP                 ioCompletion;
  1960.     OSErr                             ioResult;
  1961.     unsigned long                     saveA5;
  1962.     short                             reqCode;
  1963.     long                             reserved[2];
  1964.     AddrBlock                         serverHint;
  1965.     short                             dsRefNum;
  1966.     unsigned long                     callID;
  1967.     AuthIdentity                     identity;
  1968.     long                             gReserved1;
  1969.     long                             gReserved2;
  1970.     long                             gReserved3;
  1971.     long                             clientData;
  1972.     RecordIDPtr                     aRecord;                    /*  --> */
  1973.     AttributeTypePtr                 attrType;                    /*  --> */
  1974. };
  1975. typedef struct DirDeleteAttributeTypePB DirDeleteAttributeTypePB;
  1976.  
  1977. /*
  1978.     DeleteAttributeValue
  1979. */
  1980. struct DirDeleteAttributeValuePB {
  1981.     void *                            qLink;
  1982.     long                             reserved1;
  1983.     long                             reserved2;
  1984.     DirIOCompletionUPP                 ioCompletion;
  1985.     OSErr                             ioResult;
  1986.     unsigned long                     saveA5;
  1987.     short                             reqCode;
  1988.     long                             reserved[2];
  1989.     AddrBlock                         serverHint;
  1990.     short                             dsRefNum;
  1991.     unsigned long                     callID;
  1992.     AuthIdentity                     identity;
  1993.     long                             gReserved1;
  1994.     long                             gReserved2;
  1995.     long                             gReserved3;
  1996.     long                             clientData;
  1997.     RecordIDPtr                     aRecord;                    /*  -> */
  1998.     AttributePtr                     attr;                        /*  -> */
  1999. };
  2000. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  2001.  
  2002. /*
  2003.     ChangeAttributeValue:
  2004.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  2005.                     sufficient
  2006.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  2007.                     CreationID field will be set when
  2008.                     the call succeesfully completes
  2009.     
  2010.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  2011.  
  2012.  
  2013.     
  2014. */
  2015. struct DirChangeAttributeValuePB {
  2016.     void *                            qLink;
  2017.     long                             reserved1;
  2018.     long                             reserved2;
  2019.     DirIOCompletionUPP                 ioCompletion;
  2020.     OSErr                             ioResult;
  2021.     unsigned long                     saveA5;
  2022.     short                             reqCode;
  2023.     long                             reserved[2];
  2024.     AddrBlock                         serverHint;
  2025.     short                             dsRefNum;
  2026.     unsigned long                     callID;
  2027.     AuthIdentity                     identity;
  2028.     long                             gReserved1;
  2029.     long                             gReserved2;
  2030.     long                             gReserved3;
  2031.     long                             clientData;
  2032.     RecordIDPtr                     aRecord;                    /*  -> */
  2033.     AttributePtr                     currentAttr;                /*  -> */
  2034.     AttributePtr                     newAttr;                    /*  -> */
  2035. };
  2036. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  2037.  
  2038. /* VerifyAttributeValue */
  2039. struct DirVerifyAttributeValuePB {
  2040.     void *                            qLink;
  2041.     long                             reserved1;
  2042.     long                             reserved2;
  2043.     DirIOCompletionUPP                 ioCompletion;
  2044.     OSErr                             ioResult;
  2045.     unsigned long                     saveA5;
  2046.     short                             reqCode;
  2047.     long                             reserved[2];
  2048.     AddrBlock                         serverHint;
  2049.     short                             dsRefNum;
  2050.     unsigned long                     callID;
  2051.     AuthIdentity                     identity;
  2052.     long                             gReserved1;
  2053.     long                             gReserved2;
  2054.     long                             gReserved3;
  2055.     long                             clientData;
  2056.     RecordIDPtr                     aRecord;                    /*  --> */
  2057.     AttributePtr                     attr;                        /*  --> */
  2058. };
  2059. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  2060.  
  2061. /*
  2062. aRecord must contain valid PackedRLI and a CreationID.
  2063.  
  2064. The attribute type and value are passed in the attribute structure.  If the
  2065. attribute CreationID is non-zero, the server will verify that an attribute with
  2066. the specified value and creation number exists in aRecord.  If the attribute
  2067. CreationID is zero, the server will verify the attribute by type and value
  2068. alone, and return the attribute CreationID in the Attribute struct if the
  2069. attribute exists.
  2070. */
  2071. /*
  2072. EnumerateAttributeTypesGet:
  2073. The following two calls can be used to enumerate the attribute types present in
  2074. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2075. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2076. be returned if the buffer was not large enough.  After this call completes, the
  2077. client can call EnumerateAttributeTypesParse (see below).
  2078.  
  2079. The user will able to continue from a startingPoint by setting a startingAttrType.
  2080. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2081. when 'kOCEMoreData' is returned.
  2082.  
  2083. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2084. will be included in the results, if it exists. If this is set to false, this value will not
  2085. be included. AttributeTypes following this type will be returned.
  2086. */
  2087. struct DirEnumerateAttributeTypesGetPB {
  2088.     void *                            qLink;
  2089.     long                             reserved1;
  2090.     long                             reserved2;
  2091.     DirIOCompletionUPP                 ioCompletion;
  2092.     OSErr                             ioResult;
  2093.     unsigned long                     saveA5;
  2094.     short                             reqCode;
  2095.     long                             reserved[2];
  2096.     AddrBlock                         serverHint;
  2097.     short                             dsRefNum;
  2098.     unsigned long                     callID;
  2099.     AuthIdentity                     identity;
  2100.     long                             gReserved1;
  2101.     long                             gReserved2;
  2102.     long                             gReserved3;
  2103.     long                             clientData;
  2104.     RecordIDPtr                     aRecord;                    /*  --> */
  2105.     AttributeTypePtr                 startingAttrType;            /*  --> starting point */
  2106.     long                             cReserved;                    /*  --  */
  2107.     long                             dReserved;                    /*  --  */
  2108.     long                             eReserved;                    /*  --  */
  2109.     long                             fReserved;                    /*  --  */
  2110.     long                             gReserved;                    /*  --  */
  2111.     long                             hReserved;                    /*  --  */
  2112.     Boolean                         includeStartingPoint;        /*  --> if true return the attrType specified by starting point */
  2113.     Byte                             padByte;
  2114.     short                             i1Reserved;                    /*  --  */
  2115.     void *                            getBuffer;                    /*  --> */
  2116.     unsigned long                     getBufferSize;                /*  --> */
  2117. };
  2118. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  2119.  
  2120. /* The call-back function is defined as follows: */
  2121. typedef pascal Boolean (*ForEachAttrTypeProcPtr)(long clientData, const AttributeType *attrType);
  2122.  
  2123. #if GENERATINGCFM
  2124. typedef UniversalProcPtr ForEachAttrTypeUPP;
  2125. #else
  2126. typedef ForEachAttrTypeProcPtr ForEachAttrTypeUPP;
  2127. #endif
  2128. typedef ForEachAttrTypeUPP ForEachAttrType;
  2129. /*
  2130. EnumerateAttributeTypesParse:
  2131. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2132. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2133. toolbox will parse through the buffer and call the call-back routine for
  2134. each attribute type in the getBuffer.
  2135.  
  2136. The client should return false from eachAttrType to continue
  2137. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2138. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2139. you pass in the parameter block will be passed to eachAttrType.
  2140. You are free to put anything in clientData - it is intended to allow
  2141. you some way to match the call-back to the original call (in case, for
  2142. example, you make simultaneous asynchronous calls).
  2143.  
  2144. For synchronous calls, the call-back routine actually runs as part of the same thread
  2145. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2146. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2147. that were in effect when the call was made.  Because of this, the call-back
  2148. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2149. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2150. back routine can allocate memory. For asynchronous calls, call-back routine is
  2151. like a ioCompletion except that A5 will be preserved for the application.
  2152. */
  2153. struct DirEnumerateAttributeTypesParsePB {
  2154.     void *                            qLink;
  2155.     long                             reserved1;
  2156.     long                             reserved2;
  2157.     DirIOCompletionUPP                 ioCompletion;
  2158.     OSErr                             ioResult;
  2159.     unsigned long                     saveA5;
  2160.     short                             reqCode;
  2161.     long                             reserved[2];
  2162.     AddrBlock                         serverHint;
  2163.     short                             dsRefNum;
  2164.     unsigned long                     callID;
  2165.     AuthIdentity                     identity;
  2166.     long                             gReserved1;
  2167.     long                             gReserved2;
  2168.     long                             gReserved3;
  2169.     long                             clientData;
  2170.     RecordIDPtr                     aRecord;                    /*  --> Same as DirEnumerateAttributeTypesGetPB */
  2171.     long                             bReserved;                    /*  --  */
  2172.     long                             cReserved;                    /*  --  */
  2173.     long                             dReserved;                    /*  --  */
  2174.     ForEachAttrType                 eachAttrType;                /*  --> */
  2175.     long                             fReserved;                    /*  --  */
  2176.     long                             gReserved;                    /*  --  */
  2177.     long                             hReserved;                    /*  --  */
  2178.     long                             iReserved;                    /*  --  */
  2179.     void *                            getBuffer;                    /*  --> */
  2180.     unsigned long                     getBufferSize;                /*  --> */
  2181. };
  2182. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  2183.  
  2184. /*
  2185. DirAbort:
  2186. With this call a user will able to abort an outstanding catalog service call.
  2187. A user must pass a pointer to the parameter block for the outstanding call.
  2188. In the current version of the product, the toolbox will process this call
  2189. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2190. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2191. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2192. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2193. be called only in synchronous mode. Since the abort call makes references to fields in
  2194. the pb associated with the original call, this pb must not be disposed or or altered if
  2195. the original call completes before the abort call has completed.
  2196. */
  2197. struct DirAbortPB {
  2198.     void *                            qLink;
  2199.     long                             reserved1;
  2200.     long                             reserved2;
  2201.     DirIOCompletionUPP                 ioCompletion;
  2202.     OSErr                             ioResult;
  2203.     unsigned long                     saveA5;
  2204.     short                             reqCode;
  2205.     long                             reserved[2];
  2206.     AddrBlock                         serverHint;
  2207.     short                             dsRefNum;
  2208.     unsigned long                     callID;
  2209.     AuthIdentity                     identity;
  2210.     long                             gReserved1;
  2211.     long                             gReserved2;
  2212.     long                             gReserved3;
  2213.     long                             clientData;
  2214.     DirParamBlock *                    pb;                            /*  --> pb for the call which must be aborted */
  2215. };
  2216. typedef struct DirAbortPB DirAbortPB;
  2217.  
  2218. /*
  2219. AddPseudonym:
  2220. An alternate name and type can be added to a given record. If allowDuplicate
  2221. is set the name and type will be added even if the same name and type already
  2222. exists.
  2223. */
  2224. struct DirAddPseudonymPB {
  2225.     void *                            qLink;
  2226.     long                             reserved1;
  2227.     long                             reserved2;
  2228.     DirIOCompletionUPP                 ioCompletion;
  2229.     OSErr                             ioResult;
  2230.     unsigned long                     saveA5;
  2231.     short                             reqCode;
  2232.     long                             reserved[2];
  2233.     AddrBlock                         serverHint;
  2234.     short                             dsRefNum;
  2235.     unsigned long                     callID;
  2236.     AuthIdentity                     identity;
  2237.     long                             gReserved1;
  2238.     long                             gReserved2;
  2239.     long                             gReserved3;
  2240.     long                             clientData;
  2241.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym is to be added */
  2242.     RStringPtr                         pseudonymName;                /*  --> new name to be added as pseudonym */
  2243.     RStringPtr                         pseudonymType;                /*  --> new name to be added as pseudonym */
  2244.     Boolean                         allowDuplicate;                /*  --> */
  2245.     Boolean                         filler1;
  2246. };
  2247. typedef struct DirAddPseudonymPB DirAddPseudonymPB;
  2248.  
  2249. /*
  2250. DeletePseudonym:
  2251. An alternate name and type for a given record can be deleted.
  2252. */
  2253. struct DirDeletePseudonymPB {
  2254.     void *                            qLink;
  2255.     long                             reserved1;
  2256.     long                             reserved2;
  2257.     DirIOCompletionUPP                 ioCompletion;
  2258.     OSErr                             ioResult;
  2259.     unsigned long                     saveA5;
  2260.     short                             reqCode;
  2261.     long                             reserved[2];
  2262.     AddrBlock                         serverHint;
  2263.     short                             dsRefNum;
  2264.     unsigned long                     callID;
  2265.     AuthIdentity                     identity;
  2266.     long                             gReserved1;
  2267.     long                             gReserved2;
  2268.     long                             gReserved3;
  2269.     long                             clientData;
  2270.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym to be added */
  2271.     RStringPtr                         pseudonymName;                /*  --> pseudonymName to be deleted */
  2272.     RStringPtr                         pseudonymType;                /*  --> pseudonymType to be deleted */
  2273. };
  2274. typedef struct DirDeletePseudonymPB DirDeletePseudonymPB;
  2275.  
  2276. /*
  2277.     AddAlias:
  2278.     This call can be used to create an alias  record. The alias
  2279.     can be created either in the same or different cluster. ADAS will not support
  2280.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2281.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2282.     this call will create a record with the name and type specified an aRecord.
  2283.     This call works exactly like AddRecord.
  2284.     If 'allowDuplicate' is false and another record with same name and type already exists
  2285.     'daNoDupAllowed' error will be returned.
  2286. */
  2287. struct DirAddAliasPB {
  2288.     void *                            qLink;
  2289.     long                             reserved1;
  2290.     long                             reserved2;
  2291.     DirIOCompletionUPP                 ioCompletion;
  2292.     OSErr                             ioResult;
  2293.     unsigned long                     saveA5;
  2294.     short                             reqCode;
  2295.     long                             reserved[2];
  2296.     AddrBlock                         serverHint;
  2297.     short                             dsRefNum;
  2298.     unsigned long                     callID;
  2299.     AuthIdentity                     identity;
  2300.     long                             gReserved1;
  2301.     long                             gReserved2;
  2302.     long                             gReserved3;
  2303.     long                             clientData;
  2304.     RecordIDPtr                     aRecord;                    /*  -> */
  2305.     Boolean                         allowDuplicate;                /*  -> */
  2306.     Boolean                         filler1;
  2307. };
  2308. typedef struct DirAddAliasPB DirAddAliasPB;
  2309.  
  2310. /*
  2311. DirFindValue:
  2312. This call can be used to find the occurrence of a value. The value
  2313. to be matched is passed in the buffer 'matchingData' field. The current
  2314. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2315. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2316. be used for comparing the occurrence of data. Search can be restricted to
  2317. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2318. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2319. can be specified to find the next occurrence of the same value.
  2320. 'sortDirection' can be specified with starting values to search forward or backward.
  2321. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2322. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2323. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2324. attributes. Catalogs which don't support creationIDs may return the
  2325. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2326. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2327. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2328. find the next occurrence of the value.
  2329. */
  2330. struct DirFindValuePB {
  2331.     void *                            qLink;
  2332.     long                             reserved1;
  2333.     long                             reserved2;
  2334.     DirIOCompletionUPP                 ioCompletion;
  2335.     OSErr                             ioResult;
  2336.     unsigned long                     saveA5;
  2337.     short                             reqCode;
  2338.     long                             reserved[2];
  2339.     AddrBlock                         serverHint;
  2340.     short                             dsRefNum;
  2341.     unsigned long                     callID;
  2342.     AuthIdentity                     identity;
  2343.     long                             gReserved1;
  2344.     long                             gReserved2;
  2345.     long                             gReserved3;
  2346.     long                             clientData;
  2347.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  2348.     LocalRecordIDPtr                 aRecord;                    /*  --> if not nil, look only in this record */
  2349.     AttributeTypePtr                 attrType;                    /*  --> if not nil, look only in this attribute type */
  2350.     LocalRecordIDPtr                 startingRecord;                /*  --> record in which to start searching */
  2351.     AttributePtr                     startingAttribute;            /*  --> attribute in which to start searching */
  2352.     LocalRecordIDPtr                 recordFound;                /* <--  record in which data was found */
  2353.     Attribute                         attributeFound;                /* <--  attribute in which data was found */
  2354.     unsigned long                     matchSize;                    /*  --> length of matching bytes */
  2355.     void *                            matchingData;                /*  --> data bytes to be matched in search */
  2356.     DirSortDirection                 sortDirection;                /*  --> sort direction (forwards or backwards) */
  2357. };
  2358. typedef struct DirFindValuePB DirFindValuePB;
  2359.  
  2360. /*
  2361. EnumeratePseudonymGet:
  2362. This call can be used to enumerate the existing pseudonyms for
  2363. a given record specified in 'aRecord'. A starting point can be specified
  2364. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2365. is true and a starting point is specified, the name specified by startingName
  2366. and startingType also is returned in the results, if it exists. If this is set to false,
  2367. the pseudonym in startingName and Type is not included.
  2368. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2369. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2370. name and type of the pseudonym. If the buffer could not hold all the results, then
  2371. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2372. using the last result returned as starting point for the next call.
  2373. */
  2374. struct DirEnumeratePseudonymGetPB {
  2375.     void *                            qLink;
  2376.     long                             reserved1;
  2377.     long                             reserved2;
  2378.     DirIOCompletionUPP                 ioCompletion;
  2379.     OSErr                             ioResult;
  2380.     unsigned long                     saveA5;
  2381.     short                             reqCode;
  2382.     long                             reserved[2];
  2383.     AddrBlock                         serverHint;
  2384.     short                             dsRefNum;
  2385.     unsigned long                     callID;
  2386.     AuthIdentity                     identity;
  2387.     long                             gReserved1;
  2388.     long                             gReserved2;
  2389.     long                             gReserved3;
  2390.     long                             clientData;
  2391.     RecordIDPtr                     aRecord;                    /*  --> */
  2392.     RStringPtr                         startingName;                /*  --> */
  2393.     RStringPtr                         startingType;                /*  --> */
  2394.     long                             dReserved;                    /*  --  */
  2395.     long                             eReserved;                    /*  --  */
  2396.     long                             fReserved;                    /*  --  */
  2397.     long                             gReserved;                    /*  --  */
  2398.     long                             hReserved;                    /*  --  */
  2399.     Boolean                         includeStartingPoint;        /*  --> if true return the Pseudonym specified by starting point will be included */
  2400.     Byte                             padByte;
  2401.     short                             i1Reserved;                    /*  --  */
  2402.     void *                            getBuffer;                    /*  --> */
  2403.     unsigned long                     getBufferSize;                /*  --> */
  2404. };
  2405. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  2406.  
  2407. /* The call-back function is defined as follows: */
  2408. typedef pascal Boolean (*ForEachRecordIDProcPtr)(long clientData, const RecordID *recordID);
  2409.  
  2410. #if GENERATINGCFM
  2411. typedef UniversalProcPtr ForEachRecordIDUPP;
  2412. #else
  2413. typedef ForEachRecordIDProcPtr ForEachRecordIDUPP;
  2414. #endif
  2415. typedef ForEachRecordIDUPP ForEachRecordID;
  2416. /*
  2417. EnumeratePseudonymParse:
  2418. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2419. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2420. will be called for each pseudonym.
  2421.  
  2422. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2423.  
  2424. For synchronous calls, the call-back routine actually runs as part of the same thread
  2425. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2426. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2427. that were in effect when the call was made.  Because of this, the call-back
  2428. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2429. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2430. back routine can allocate memory. For asynchronous calls, call-back routine is
  2431. like a ioCompletion except that A5 will be preserved for the application.
  2432. */
  2433. struct DirEnumeratePseudonymParsePB {
  2434.     void *                            qLink;
  2435.     long                             reserved1;
  2436.     long                             reserved2;
  2437.     DirIOCompletionUPP                 ioCompletion;
  2438.     OSErr                             ioResult;
  2439.     unsigned long                     saveA5;
  2440.     short                             reqCode;
  2441.     long                             reserved[2];
  2442.     AddrBlock                         serverHint;
  2443.     short                             dsRefNum;
  2444.     unsigned long                     callID;
  2445.     AuthIdentity                     identity;
  2446.     long                             gReserved1;
  2447.     long                             gReserved2;
  2448.     long                             gReserved3;
  2449.     long                             clientData;
  2450.     RecordIDPtr                     aRecord;                    /*  --> same as DirEnumerateAliasesGetPB */
  2451.     long                             bReserved;                    /*  --  */
  2452.     long                             cReserved;                    /*  --  */
  2453.     ForEachRecordID                 eachRecordID;                /*  --> */
  2454.     long                             eReserved;                    /*  --  */
  2455.     long                             fReserved;                    /*  --  */
  2456.     long                             gReserved;                    /*  --  */
  2457.     long                             hReserved;                    /*  --  */
  2458.     long                             iReserved;                    /*  --  */
  2459.     void *                            getBuffer;                    /*  --> */
  2460.     unsigned long                     getBufferSize;                /*  --> */
  2461. };
  2462. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  2463.  
  2464. /* GetNameAndType */
  2465. struct DirGetNameAndTypePB {
  2466.     void *                            qLink;
  2467.     long                             reserved1;
  2468.     long                             reserved2;
  2469.     DirIOCompletionUPP                 ioCompletion;
  2470.     OSErr                             ioResult;
  2471.     unsigned long                     saveA5;
  2472.     short                             reqCode;
  2473.     long                             reserved[2];
  2474.     AddrBlock                         serverHint;
  2475.     short                             dsRefNum;
  2476.     unsigned long                     callID;
  2477.     AuthIdentity                     identity;
  2478.     long                             gReserved1;
  2479.     long                             gReserved2;
  2480.     long                             gReserved3;
  2481.     long                             clientData;
  2482.     RecordIDPtr                     aRecord;                    /*  --> */
  2483. };
  2484. typedef struct DirGetNameAndTypePB DirGetNameAndTypePB;
  2485.  
  2486. /*
  2487. aRecord must contain valid RLI and a CreationID.  It
  2488. must also contain pointers to maximum-length RStrings (name and type fields)
  2489. in which will be returned the record's distinguished name and type.
  2490. */
  2491. /*
  2492. SetNameAndType:
  2493. This call can be used to change a name and type for a record. The record
  2494. to be renamed is specified using 'aRecord'.
  2495. 'newName' and 'newType' indicate the name and type to be set.
  2496. 'allowDuplicate' if true indicates that name is to be set even if another
  2497. name and type exactly matches the newName and newType specified.
  2498.  
  2499. 'newName' and 'newType' are required since the catalogs not supporting
  2500. CreationID require name and type fields in the recordID to identify a given
  2501. record.
  2502. */
  2503. struct DirSetNameAndTypePB {
  2504.     void *                            qLink;
  2505.     long                             reserved1;
  2506.     long                             reserved2;
  2507.     DirIOCompletionUPP                 ioCompletion;
  2508.     OSErr                             ioResult;
  2509.     unsigned long                     saveA5;
  2510.     short                             reqCode;
  2511.     long                             reserved[2];
  2512.     AddrBlock                         serverHint;
  2513.     short                             dsRefNum;
  2514.     unsigned long                     callID;
  2515.     AuthIdentity                     identity;
  2516.     long                             gReserved1;
  2517.     long                             gReserved2;
  2518.     long                             gReserved3;
  2519.     long                             clientData;
  2520.     RecordIDPtr                     aRecord;                    /*  --> */
  2521.     Boolean                         allowDuplicate;                /*  --> */
  2522.     Byte                             padByte;
  2523.     RStringPtr                         newName;                    /*  --> new name for the record */
  2524.     RStringPtr                         newType;                    /*  --> new type for the record */
  2525. };
  2526. typedef struct DirSetNameAndTypePB DirSetNameAndTypePB;
  2527.  
  2528. /*
  2529. DirGetMetaRecordInfo: This call can be made to obtain
  2530. the MetaRecordInfo for a given record. Information returned
  2531. is 16 bytes of OPAQUE information about the record.
  2532. */
  2533. struct DirGetRecordMetaInfoPB {
  2534.     void *                            qLink;
  2535.     long                             reserved1;
  2536.     long                             reserved2;
  2537.     DirIOCompletionUPP                 ioCompletion;
  2538.     OSErr                             ioResult;
  2539.     unsigned long                     saveA5;
  2540.     short                             reqCode;
  2541.     long                             reserved[2];
  2542.     AddrBlock                         serverHint;
  2543.     short                             dsRefNum;
  2544.     unsigned long                     callID;
  2545.     AuthIdentity                     identity;
  2546.     long                             gReserved1;
  2547.     long                             gReserved2;
  2548.     long                             gReserved3;
  2549.     long                             clientData;
  2550.     RecordIDPtr                     aRecord;                    /*  --> */
  2551.     DirMetaInfo                     metaInfo;                    /* <--  */
  2552. };
  2553. typedef struct DirGetRecordMetaInfoPB DirGetRecordMetaInfoPB;
  2554.  
  2555. /*
  2556. DirGetDNodeMetaInfo: This call can be made to obtain
  2557. the DNodeMetaInfo for a given Packed RLI. Information returned
  2558. is 16 bytes of OPAQUE information about the DNode.
  2559. */
  2560. struct DirGetDNodeMetaInfoPB {
  2561.     void *                            qLink;
  2562.     long                             reserved1;
  2563.     long                             reserved2;
  2564.     DirIOCompletionUPP                 ioCompletion;
  2565.     OSErr                             ioResult;
  2566.     unsigned long                     saveA5;
  2567.     short                             reqCode;
  2568.     long                             reserved[2];
  2569.     AddrBlock                         serverHint;
  2570.     short                             dsRefNum;
  2571.     unsigned long                     callID;
  2572.     AuthIdentity                     identity;
  2573.     long                             gReserved1;
  2574.     long                             gReserved2;
  2575.     long                             gReserved3;
  2576.     long                             clientData;
  2577.     PackedRLIPtr                     pRLI;                        /*  --> */
  2578.     DirMetaInfo                     metaInfo;                    /* <--  */
  2579. };
  2580. typedef struct DirGetDNodeMetaInfoPB DirGetDNodeMetaInfoPB;
  2581.  
  2582. /*
  2583. EnumerateDirectoriesGet:
  2584. A user can enumerate all the catalogs installed. This includes installed
  2585. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2586. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2587. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2588. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2589. The information for each catalog returned will have directoryName, discriminator and features.
  2590.  
  2591. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2592. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2593.  
  2594. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2595. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2596.  
  2597. If 'includeStartingPoint' is true and a starting point is specified,
  2598. the staring point will be returned in the result. If false, it is not included.
  2599. */
  2600. struct DirEnumerateDirectoriesGetPB {
  2601.     void *                            qLink;
  2602.     long                             reserved1;
  2603.     long                             reserved2;
  2604.     DirIOCompletionUPP                 ioCompletion;
  2605.     OSErr                             ioResult;
  2606.     unsigned long                     saveA5;
  2607.     short                             reqCode;
  2608.     long                             reserved[2];
  2609.     AddrBlock                         serverHint;
  2610.     short                             dsRefNum;
  2611.     unsigned long                     callID;
  2612.     AuthIdentity                     identity;
  2613.     long                             gReserved1;
  2614.     long                             gReserved2;
  2615.     long                             gReserved3;
  2616.     long                             clientData;
  2617.     OCEDirectoryKind                 directoryKind;                /*  --> enumerate catalogs bearing this signature */
  2618.     DirectoryNamePtr                 startingDirectoryName;        /*  --> staring catalog name */
  2619.     DirDiscriminator                 startingDirDiscriminator;    /*  --> staring catalog discriminator */
  2620.     long                             eReserved;                    /*  --  */
  2621.     long                             fReserved;                    /*  --  */
  2622.     long                             gReserved;                    /*  --  */
  2623.     long                             hReserved;                    /*  --  */
  2624.     Boolean                         includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  2625.     Byte                             padByte;
  2626.     short                             i1Reserved;                    /*  --  */
  2627.     void *                            getBuffer;                    /*  --> */
  2628.     unsigned long                     getBufferSize;                /*  --> */
  2629. };
  2630. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  2631.  
  2632. typedef pascal Boolean (*ForEachDirectoryProcPtr)(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
  2633.  
  2634. #if GENERATINGCFM
  2635. typedef UniversalProcPtr ForEachDirectoryUPP;
  2636. #else
  2637. typedef ForEachDirectoryProcPtr ForEachDirectoryUPP;
  2638. #endif
  2639. typedef ForEachDirectoryUPP ForEachDirectory;
  2640. /*
  2641. EnumerateDirectoriesParse:
  2642. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2643. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2644. be called for each catalog.
  2645.  
  2646. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2647.  
  2648. For synchronous calls, the call-back routine actually runs as part of the same thread
  2649. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2650. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2651. that were in effect when the call was made.  Because of this, the call-back
  2652. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2653. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2654. back routine can allocate memory. For asynchronous calls, call-back routine is
  2655. like a ioCompletion except that A5 will be preserved for the application.
  2656.  
  2657. eachDirectory will be called each time to return to the client a
  2658. DirectoryName, DirDiscriminator, and features for that catalog.
  2659. */
  2660. struct DirEnumerateDirectoriesParsePB {
  2661.     void *                            qLink;
  2662.     long                             reserved1;
  2663.     long                             reserved2;
  2664.     DirIOCompletionUPP                 ioCompletion;
  2665.     OSErr                             ioResult;
  2666.     unsigned long                     saveA5;
  2667.     short                             reqCode;
  2668.     long                             reserved[2];
  2669.     AddrBlock                         serverHint;
  2670.     short                             dsRefNum;
  2671.     unsigned long                     callID;
  2672.     AuthIdentity                     identity;
  2673.     long                             gReserved1;
  2674.     long                             gReserved2;
  2675.     long                             gReserved3;
  2676.     long                             clientData;
  2677.     long                             aReserved;                    /*  --  */
  2678.     long                             bReserved;                    /*  --  */
  2679.     long                             cReserved;                    /*  --  */
  2680.     long                             dReserved;                    /*  --  */
  2681.     ForEachDirectory                 eachDirectory;                /*  --> */
  2682.     long                             fReserved;                    /*  --  */
  2683.     long                             gReserved;                    /*  --  */
  2684.     long                             hReserved;                    /*  --  */
  2685.     long                             iReserved;                    /*  --  */
  2686.     void *                            getBuffer;                    /*  --> */
  2687.     unsigned long                     getBufferSize;                /*  --> */
  2688. };
  2689. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  2690.  
  2691. /*
  2692. The Following five call are specific to ADAP Catalogs. Toolbox
  2693. remembers a list of catalogs across boots. If any catalog service
  2694. call is intended for a ADAP catalog, then it must be in the list.
  2695. In order for managing this list, A client (Probably DE will use these
  2696. calls.
  2697. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2698. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2699. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2700. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2701. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2702. */
  2703. /*
  2704. NetSearchADAPDirectoriesGet:
  2705. This call can be used to make a network wide search for finding ADAP catalogs.
  2706. This call will be supported only by 'ADAP' and involve highly expensive
  2707. network operations, so the user is advised to use utmost discretion before
  2708. making this call. The results will be collected in the 'getbuffer' and can be
  2709. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2710. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2711. a PathFinder serving that catalog) are collected for each catalog found
  2712. on the network. If buffer is too small to hold all the catalogs found on
  2713. the network, a 'kOCEMoreData' error will be returned.
  2714. */
  2715. struct DirNetSearchADAPDirectoriesGetPB {
  2716.     void *                            qLink;
  2717.     long                             reserved1;
  2718.     long                             reserved2;
  2719.     DirIOCompletionUPP                 ioCompletion;
  2720.     OSErr                             ioResult;
  2721.     unsigned long                     saveA5;
  2722.     short                             reqCode;
  2723.     long                             reserved[2];
  2724.     AddrBlock                         serverHint;
  2725.     short                             dsRefNum;
  2726.     unsigned long                     callID;
  2727.     AuthIdentity                     identity;
  2728.     long                             gReserved1;
  2729.     long                             gReserved2;
  2730.     long                             gReserved3;
  2731.     long                             clientData;
  2732.     void *                            getBuffer;                    /*  --> */
  2733.     unsigned long                     getBufferSize;                /*  --> */
  2734.     long                             cReserved;                    /*  --  */
  2735. };
  2736. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  2737.  
  2738. typedef pascal Boolean (*ForEachADAPDirectoryProcPtr)(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
  2739.  
  2740. #if GENERATINGCFM
  2741. typedef UniversalProcPtr ForEachADAPDirectoryUPP;
  2742. #else
  2743. typedef ForEachADAPDirectoryProcPtr ForEachADAPDirectoryUPP;
  2744. #endif
  2745. typedef ForEachADAPDirectoryUPP ForEachADAPDirectory;
  2746. /*
  2747. DirNetSearchADAPDirectoriesParse:
  2748. This call can be used to extract the results obtained in the 'getBuffer'.
  2749. The directoryName, directoryDiscriminator, features and
  2750. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2751. returned in each call-back. These values may be used to make an
  2752. AddADAPDirectory call.
  2753.  
  2754. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2755.  
  2756. For synchronous calls, the call-back routine actually runs as part of the same thread
  2757. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2758. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2759. that were in effect when the call was made.  Because of this, the call-back
  2760. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2761. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2762. back routine can allocate memory. For asynchronous calls, call-back routine is
  2763. like a ioCompletion except that A5 will be preserved for the application.
  2764. */
  2765. struct DirNetSearchADAPDirectoriesParsePB {
  2766.     void *                            qLink;
  2767.     long                             reserved1;
  2768.     long                             reserved2;
  2769.     DirIOCompletionUPP                 ioCompletion;
  2770.     OSErr                             ioResult;
  2771.     unsigned long                     saveA5;
  2772.     short                             reqCode;
  2773.     long                             reserved[2];
  2774.     AddrBlock                         serverHint;
  2775.     short                             dsRefNum;
  2776.     unsigned long                     callID;
  2777.     AuthIdentity                     identity;
  2778.     long                             gReserved1;
  2779.     long                             gReserved2;
  2780.     long                             gReserved3;
  2781.     long                             clientData;
  2782.     void *                            getBuffer;                    /*  --> */
  2783.     unsigned long                     getBufferSize;                /*  --> */
  2784.     ForEachADAPDirectory             eachADAPDirectory;            /*  --> */
  2785. };
  2786. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2787.  
  2788. /*
  2789. DirFindADAPDirectoryByNetSearch:
  2790. This call can be used to make a network wide search to find an ADAP catalog.
  2791. This call will be supported only by 'ADAP' and involves highly expensive
  2792. network operations, so the user is advised to use utmost discretion before
  2793. making this call. The catalog is specified using directoryName and discriminator.
  2794. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2795. list and will be visible through the EnumerateDirectories call and also
  2796. also a creationID to the directoryRecord will be returned.
  2797. If this parameter is set to 'false', the catalog will be added to temporary list
  2798. and will be available for making other catalog service calls. The catalogs
  2799. which are not in the preference catalog list will not be visible through the
  2800. EnumerateDirectories call.
  2801. */
  2802. struct DirFindADAPDirectoryByNetSearchPB {
  2803.     void *                            qLink;
  2804.     long                             reserved1;
  2805.     long                             reserved2;
  2806.     DirIOCompletionUPP                 ioCompletion;
  2807.     OSErr                             ioResult;
  2808.     unsigned long                     saveA5;
  2809.     short                             reqCode;
  2810.     long                             reserved[2];
  2811.     AddrBlock                         serverHint;
  2812.     short                             dsRefNum;
  2813.     unsigned long                     callID;
  2814.     AuthIdentity                     identity;
  2815.     long                             gReserved1;
  2816.     long                             gReserved2;
  2817.     long                             gReserved3;
  2818.     long                             clientData;
  2819.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2820.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2821.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup List */
  2822.     Byte                             padByte;
  2823.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2824. };
  2825. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2826.  
  2827. /*
  2828. DirAddADAPDirectory:
  2829. The catalog specified by 'directoryName' and 'discriminator' will be
  2830. added to the list of catalogs maintained by the Toolbox. Once added,
  2831. the catalog is available across boots, until the catalog is removed
  2832. explicitly through a DirRemoveADAPDirectory call.
  2833. If 'serverHint' is not nil, the address provided will be used
  2834. to contact a PathFinder for the catalog specified.
  2835. If 'serverHint' is nil or does not point to a valid PathFinder server
  2836. for that catalog, this call will fail.
  2837. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2838. catalog list and will be visible through EnumerateDirectories calls and
  2839. also a creationID to the directoryRecord will be returned.
  2840. If this parameter is set to 'false', catalog will be added to temprary list
  2841. and will be available for making other catalog service calls. The catalogs
  2842. which are not in the setup  list will not be visible through
  2843. EnumerateDirectories call.
  2844. */
  2845. struct DirAddADAPDirectoryPB {
  2846.     void *                            qLink;
  2847.     long                             reserved1;
  2848.     long                             reserved2;
  2849.     DirIOCompletionUPP                 ioCompletion;
  2850.     OSErr                             ioResult;
  2851.     unsigned long                     saveA5;
  2852.     short                             reqCode;
  2853.     long                             reserved[2];
  2854.     AddrBlock                         serverHint;
  2855.     short                             dsRefNum;
  2856.     unsigned long                     callID;
  2857.     AuthIdentity                     identity;
  2858.     long                             gReserved1;
  2859.     long                             gReserved2;
  2860.     long                             gReserved3;
  2861.     long                             clientData;
  2862.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2863.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2864.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup */
  2865.     Byte                             padByte;
  2866.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2867. };
  2868. typedef struct DirAddADAPDirectoryPB DirAddADAPDirectoryPB;
  2869.  
  2870. /*
  2871. GetDirectoryInfo:
  2872. DirGetDirectoryInfo will do:
  2873.  
  2874. If a 'dsRefNum' is non-Zero, the catalog information for
  2875.     the corresponding  PAB will be  returned.
  2876.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2877.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2878.  the catalog information (i.e. directoryName, discriminator, features)
  2879.  for that catalog will be returned.
  2880.     If a  valid catalog name and discriminator are provided
  2881.     features (Set of capability flags) for that catalog will be returned.
  2882. */
  2883. struct DirGetDirectoryInfoPB {
  2884.     void *                            qLink;
  2885.     long                             reserved1;
  2886.     long                             reserved2;
  2887.     DirIOCompletionUPP                 ioCompletion;
  2888.     OSErr                             ioResult;
  2889.     unsigned long                     saveA5;
  2890.     short                             reqCode;
  2891.     long                             reserved[2];
  2892.     AddrBlock                         serverHint;
  2893.     short                             dsRefNum;
  2894.     unsigned long                     callID;
  2895.     AuthIdentity                     identity;
  2896.     long                             gReserved1;
  2897.     long                             gReserved2;
  2898.     long                             gReserved3;
  2899.     long                             clientData;
  2900.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2901.     DirDiscriminator                 discriminator;                /* <--> descriminate between dup catalog names */
  2902.     DirGestalt                         features;                    /* <--  capability bit flags */
  2903. };
  2904. typedef struct DirGetDirectoryInfoPB DirGetDirectoryInfoPB;
  2905.  
  2906. /*
  2907.  * Note on Access Controls:
  2908.  * Access control is based on a list model.
  2909.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2910.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2911.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2912.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2913.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2914.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2915.  *
  2916. */
  2917. /*
  2918.     GetDNodeAccessControlGet:
  2919.     This call can be done to get back access control list for a DNode.
  2920.     pRLI -> RLI of the DNode whose access control list is sought
  2921.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2922.                       the identity parameter will be returned other wise entire list
  2923.                       will be returned.
  2924.     startingDsObj  -> If this is not nil, list should be started after this object.
  2925.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2926.                               results.
  2927.                               
  2928.     The results will be collected in the 'getBuffer' supplied by the user.
  2929.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2930.      
  2931.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2932.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2933.     
  2934.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2935.  
  2936. */
  2937. struct DirGetDNodeAccessControlGetPB {
  2938.     void *                            qLink;
  2939.     long                             reserved1;
  2940.     long                             reserved2;
  2941.     DirIOCompletionUPP                 ioCompletion;
  2942.     OSErr                             ioResult;
  2943.     unsigned long                     saveA5;
  2944.     short                             reqCode;
  2945.     long                             reserved[2];
  2946.     AddrBlock                         serverHint;
  2947.     short                             dsRefNum;
  2948.     unsigned long                     callID;
  2949.     AuthIdentity                     identity;
  2950.     long                             gReserved1;
  2951.     long                             gReserved2;
  2952.     long                             gReserved3;
  2953.     long                             clientData;
  2954.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster whose access control list is sought  */
  2955.     long                             bReserved;                    /*  -- unused */
  2956.     long                             cReserved;                    /*  -- unused */
  2957.     long                             dReserved;                    /*  -- unused */
  2958.     long                             eResreved;                    /* --> */
  2959.     Boolean                         forCurrentUserOnly;            /* -->  */
  2960.     Boolean                         filler1;
  2961.     DSSpec *                        startingPoint;                /* --> starting Point */
  2962.     Boolean                         includeStartingPoint;        /* --> if true return the DsObject specified in starting point */
  2963.     Boolean                         filler2;
  2964.     void *                            getBuffer;                    /*    -> */
  2965.     unsigned long                     getBufferSize;                /*  -> */
  2966.  
  2967.  
  2968. };
  2969. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  2970.  
  2971. /* The Access Control call-back function is defined as follows: */
  2972. typedef pascal Boolean (*ForEachDNodeAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
  2973.  
  2974. #if GENERATINGCFM
  2975. typedef UniversalProcPtr ForEachDNodeAccessControlUPP;
  2976. #else
  2977. typedef ForEachDNodeAccessControlProcPtr ForEachDNodeAccessControlUPP;
  2978. #endif
  2979. typedef ForEachDNodeAccessControlUPP ForEachDNodeAccessControl;
  2980. /*
  2981.     GetDNodeAccessControlParse:
  2982.     After an GetDNodeAccessControlGet call has completed, 
  2983.     call GetDNodeAccessControlParse to parse through the buffer that
  2984.     that was filled in GetDNodeAccessControlGet.
  2985.     
  2986.     'eachObject' will be called each time to return to the client a
  2987.     DsObject and a set of three accMasks (three long words) for that object.
  2988.     Acceesmasks returned apply to the dsObject in the callback :
  2989.     1. Currently Active Access mask for the specified DNode.
  2990.     2. Default Access mask for any Record in the DNode
  2991.     3. Default Access mask for any Attribute in the DNode
  2992.     The clientData parameter that you pass in the parameter block will be passed
  2993.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2994.     to allow you some way to match the call-back to the original call (for
  2995.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2996.     associate returned results in some way).
  2997.     
  2998.     The client should return FALSE from 'eachObject' to continue
  2999.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  3000.     terminate the GetDNodeAccessControlParse request.
  3001.  
  3002.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3003.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  3004.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3005.     that were in effect when the call was made.  Because of this, the call-back
  3006.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  3007.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  3008.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3009.     like a ioCompletion except that A5 will be preserved for the application.
  3010.  
  3011.  
  3012. */
  3013. struct DirGetDNodeAccessControlParsePB {
  3014.     void *                            qLink;
  3015.     long                             reserved1;
  3016.     long                             reserved2;
  3017.     DirIOCompletionUPP                 ioCompletion;
  3018.     OSErr                             ioResult;
  3019.     unsigned long                     saveA5;
  3020.     short                             reqCode;
  3021.     long                             reserved[2];
  3022.     AddrBlock                         serverHint;
  3023.     short                             dsRefNum;
  3024.     unsigned long                     callID;
  3025.     AuthIdentity                     identity;
  3026.     long                             gReserved1;
  3027.     long                             gReserved2;
  3028.     long                             gReserved3;
  3029.     long                             clientData;
  3030.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster  */
  3031.     long                             bReserved;                    /*  -- unused */
  3032.     long                             cReserved;                    /*  -- unused */
  3033.     long                             dReserved;                    /*  -- unused */
  3034.     ForEachDNodeAccessControl         eachObject;                    /* --> */
  3035.     Boolean                         forCurrentUserOnly;            /* -->  */
  3036.     Boolean                         filler1;
  3037.     DSSpec *                        startingPoint;                /* --> starting Point */
  3038.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3039.     Boolean                         filler2;
  3040.     void *                            getBuffer;                    /*    -> */
  3041.     unsigned long                     getBufferSize;                /*  -> */
  3042.  
  3043.  
  3044. };
  3045. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  3046.  
  3047. /*
  3048.     GetRecordAccessControlGet:
  3049.     This call can be done to get back access control list for a RecordID.
  3050.     aRecord -> RecordID to which access control list is sought
  3051.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3052.                       the identity parameter will be returned other wise entire list
  3053.                       will be returned.
  3054.     startingDsObj  -> If this is not nil, list should be started after this object.
  3055.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3056.                               results.
  3057.                               
  3058.     The results will be collected in the 'getBuffer' supplied by the user.
  3059.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3060.      
  3061.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3062.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3063.     
  3064.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3065.  
  3066. */
  3067. struct DirGetRecordAccessControlGetPB {
  3068.     void *                            qLink;
  3069.     long                             reserved1;
  3070.     long                             reserved2;
  3071.     DirIOCompletionUPP                 ioCompletion;
  3072.     OSErr                             ioResult;
  3073.     unsigned long                     saveA5;
  3074.     short                             reqCode;
  3075.     long                             reserved[2];
  3076.     AddrBlock                         serverHint;
  3077.     short                             dsRefNum;
  3078.     unsigned long                     callID;
  3079.     AuthIdentity                     identity;
  3080.     long                             gReserved1;
  3081.     long                             gReserved2;
  3082.     long                             gReserved3;
  3083.     long                             clientData;
  3084.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3085.     long                             bReserved;                    /*  -- unused */
  3086.     long                             cReserved;                    /*  -- unused */
  3087.     long                             dReserved;                    /*  -- unused */
  3088.     long                             eResreved;                    /* --> */
  3089.     Boolean                         forCurrentUserOnly;            /* -->  */
  3090.     Boolean                         filler1;
  3091.     DSSpec *                        startingPoint;                /* --> starting Point */
  3092.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3093.     Boolean                         filler2;
  3094.     void *                            getBuffer;                    /*    -> */
  3095.     unsigned long                     getBufferSize;                /*  -> */
  3096.  
  3097.  
  3098. };
  3099. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  3100.  
  3101. /* The Access Control call-back function is defined as follows: */
  3102. typedef pascal Boolean (*ForEachRecordAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
  3103.  
  3104. #if GENERATINGCFM
  3105. typedef UniversalProcPtr ForEachRecordAccessControlUPP;
  3106. #else
  3107. typedef ForEachRecordAccessControlProcPtr ForEachRecordAccessControlUPP;
  3108. #endif
  3109. typedef ForEachRecordAccessControlUPP ForEachRecordAccessControl;
  3110. /*
  3111.     GetRecordAccessControlParse:
  3112.     After an GetRecordAccessControlGet call has completed, 
  3113.     call GetRecordAccessControlParse to parse through the buffer that
  3114.     that was filled in GetRecordAccessControlGet.
  3115.     
  3116.     'eachObject' will be called each time to return to the client a
  3117.     DsObject and a set of three accMasks (three long words) for that object.
  3118.     Acceesmasks returned apply to the dsObject in the callback :
  3119.     1. Active Access mask for the DNode Containing the Record.
  3120.     2. Active Access mask for the Record specified.
  3121.     3. Defualt Access mask for Attributes in the record.
  3122.     The clientData parameter that you pass in the parameter block will be passed
  3123.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3124.     to allow you some way to match the call-back to the original call (for
  3125.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3126.     associate returned results in some way).
  3127.     
  3128.     The client should return FALSE from 'eachObject' to continue
  3129.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3130.     terminate the GetRecordAccessControlParse request.
  3131.  
  3132.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3133.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3134.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3135.     that were in effect when the call was made.  Because of this, the call-back
  3136.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3137.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3138.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3139.     like a ioCompletion except that A5 will be preserved for the application.
  3140.  
  3141.  
  3142. */
  3143. struct DirGetRecordAccessControlParsePB {
  3144.     void *                            qLink;
  3145.     long                             reserved1;
  3146.     long                             reserved2;
  3147.     DirIOCompletionUPP                 ioCompletion;
  3148.     OSErr                             ioResult;
  3149.     unsigned long                     saveA5;
  3150.     short                             reqCode;
  3151.     long                             reserved[2];
  3152.     AddrBlock                         serverHint;
  3153.     short                             dsRefNum;
  3154.     unsigned long                     callID;
  3155.     AuthIdentity                     identity;
  3156.     long                             gReserved1;
  3157.     long                             gReserved2;
  3158.     long                             gReserved3;
  3159.     long                             clientData;
  3160.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3161.     long                             bReserved;                    /*  -- unused */
  3162.     long                             cReserved;                    /*  -- unused */
  3163.     long                             dReserved;                    /*  -- unused */
  3164.     ForEachRecordAccessControl         eachObject;                    /* --> */
  3165.     Boolean                         forCurrentUserOnly;            /* -->  */
  3166.     Boolean                         filler1;
  3167.     DSSpec *                        startingPoint;                /* --> starting Point */
  3168.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3169.     Boolean                         filler2;
  3170.     void *                            getBuffer;                    /*    -> */
  3171.     unsigned long                     getBufferSize;                /*  -> */
  3172.  
  3173.  
  3174. };
  3175. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  3176.  
  3177. /*
  3178.     GetAttributeAccessControlGet:
  3179.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3180.     aRecord -> RecordID to which access control list is sought
  3181.     aType    -> Attribute Type to which access controls are sought
  3182.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3183.                       the identity parameter will be returned other wise entire list
  3184.                       will be returned.
  3185.     startingDsObj  -> If this is not nil, list should be started after this object.
  3186.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3187.                               results.
  3188.                               
  3189.     The results will be collected in the 'getBuffer' supplied by the user.
  3190.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3191.      
  3192.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3193.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3194.     
  3195.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3196.  
  3197. */
  3198. struct DirGetAttributeAccessControlGetPB {
  3199.     void *                            qLink;
  3200.     long                             reserved1;
  3201.     long                             reserved2;
  3202.     DirIOCompletionUPP                 ioCompletion;
  3203.     OSErr                             ioResult;
  3204.     unsigned long                     saveA5;
  3205.     short                             reqCode;
  3206.     long                             reserved[2];
  3207.     AddrBlock                         serverHint;
  3208.     short                             dsRefNum;
  3209.     unsigned long                     callID;
  3210.     AuthIdentity                     identity;
  3211.     long                             gReserved1;
  3212.     long                             gReserved2;
  3213.     long                             gReserved3;
  3214.     long                             clientData;
  3215.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3216.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3217.     long                             cReserved;                    /*  -- unused */
  3218.     long                             dReserved;                    /*  -- unused */
  3219.     long                             eResreved;                    /* --> */
  3220.     Boolean                         forCurrentUserOnly;            /* -->  */
  3221.     Boolean                         filler1;
  3222.     DSSpec *                        startingPoint;                /* --> starting Point */
  3223.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3224.     Boolean                         filler2;
  3225.     void *                            getBuffer;                    /*    -> */
  3226.     unsigned long                     getBufferSize;                /*  -> */
  3227.  
  3228.  
  3229. };
  3230. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  3231.  
  3232. /* The Access Control call-back function is defined as follows: */
  3233. typedef pascal Boolean (*ForEachAttributeAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
  3234.  
  3235. #if GENERATINGCFM
  3236. typedef UniversalProcPtr ForEachAttributeAccessControlUPP;
  3237. #else
  3238. typedef ForEachAttributeAccessControlProcPtr ForEachAttributeAccessControlUPP;
  3239. #endif
  3240. typedef ForEachAttributeAccessControlUPP ForEachAttributeAccessControl;
  3241. /*
  3242.     GetAttributeAccessControlParse:
  3243.     After an GetAttributeAccessControlGet call has completed, 
  3244.     call GetAttributeAccessControlParse to parse through the buffer that
  3245.     that was filled in GetAttributeAccessControlGet.
  3246.     
  3247.     'eachObject' will be called each time to return to the client a
  3248.     DsObject and a set of three accMasks (three long words) for that object.
  3249.     Acceesmasks returned apply to the dsObject in the callback :
  3250.     1. Active Access mask for the DNode Containing the Attribute.
  3251.     2. Active Access mask for the Record in the Containing the Attribute.
  3252.     3. Active Access mask for the specified Attribute.
  3253.     The clientData parameter that you pass in the parameter block will be passed
  3254.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3255.     to allow you some way to match the call-back to the original call (for
  3256.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3257.     associate returned results in some way).
  3258.     
  3259.     The client should return FALSE from 'eachObject' to continue
  3260.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3261.     terminate the GetAttributeAccessControlParse request.
  3262.  
  3263.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3264.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3265.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3266.     that were in effect when the call was made.  Because of this, the call-back
  3267.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3268.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3269.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3270.     like a ioCompletion except that A5 will be preserved for the application.
  3271.  
  3272.  
  3273. */
  3274. struct DirGetAttributeAccessControlParsePB {
  3275.     void *                            qLink;
  3276.     long                             reserved1;
  3277.     long                             reserved2;
  3278.     DirIOCompletionUPP                 ioCompletion;
  3279.     OSErr                             ioResult;
  3280.     unsigned long                     saveA5;
  3281.     short                             reqCode;
  3282.     long                             reserved[2];
  3283.     AddrBlock                         serverHint;
  3284.     short                             dsRefNum;
  3285.     unsigned long                     callID;
  3286.     AuthIdentity                     identity;
  3287.     long                             gReserved1;
  3288.     long                             gReserved2;
  3289.     long                             gReserved3;
  3290.     long                             clientData;
  3291.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3292.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3293.     long                             cReserved;                    /*  -- unused */
  3294.     long                             dReserved;                    /*  -- unused */
  3295.     ForEachAttributeAccessControl     eachObject;                    /* --> */
  3296.     Boolean                         forCurrentUserOnly;            /* -->  */
  3297.     Boolean                         filler1;
  3298.     DSSpec *                        startingPoint;                /* --> starting Point */
  3299.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3300.     Boolean                         filler2;
  3301.     void *                            getBuffer;                    /*    -> */
  3302.     unsigned long                     getBufferSize;                /*  -> */
  3303.  
  3304.  
  3305. };
  3306. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  3307.  
  3308. /*
  3309. MapPathNameToDNodeNumber:
  3310. This call maps a given PathName within a catalog to its DNodeNumber.
  3311. */
  3312. struct DirMapPathNameToDNodeNumberPB {
  3313.     void *                            qLink;
  3314.     long                             reserved1;
  3315.     long                             reserved2;
  3316.     DirIOCompletionUPP                 ioCompletion;
  3317.     OSErr                             ioResult;
  3318.     unsigned long                     saveA5;
  3319.     short                             reqCode;
  3320.     long                             reserved[2];
  3321.     AddrBlock                         serverHint;
  3322.     short                             dsRefNum;
  3323.     unsigned long                     callID;
  3324.     AuthIdentity                     identity;
  3325.     long                             gReserved1;
  3326.     long                             gReserved2;
  3327.     long                             gReserved3;
  3328.     long                             clientData;
  3329.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3330.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3331.     DNodeNum                         dNodeNumber;                /* <--  dNodenumber to the path */
  3332.     PackedPathNamePtr                 path;                        /*  --> Path Name to be mapped */
  3333. };
  3334. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  3335.  
  3336. /*
  3337. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3338. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3339. ignored. DSRefNum is used to identify the catalog.
  3340. */
  3341. /*
  3342. MapDNodeNumberToPathName:
  3343. This call will map a given DNodeNumber with in a catalog to the
  3344. corresponding PathName.
  3345. */
  3346. struct DirMapDNodeNumberToPathNamePB {
  3347.     void *                            qLink;
  3348.     long                             reserved1;
  3349.     long                             reserved2;
  3350.     DirIOCompletionUPP                 ioCompletion;
  3351.     OSErr                             ioResult;
  3352.     unsigned long                     saveA5;
  3353.     short                             reqCode;
  3354.     long                             reserved[2];
  3355.     AddrBlock                         serverHint;
  3356.     short                             dsRefNum;
  3357.     unsigned long                     callID;
  3358.     AuthIdentity                     identity;
  3359.     long                             gReserved1;
  3360.     long                             gReserved2;
  3361.     long                             gReserved3;
  3362.     long                             clientData;
  3363.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3364.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3365.     DNodeNum                         dNodeNumber;                /*  --> dNodenumber to be mapped */
  3366.     PackedPathNamePtr                 path;                        /* <--  Packed Path Name returned */
  3367.     unsigned short                     lengthOfPathName;            /*  --> length of packed pathName structure*/
  3368. };
  3369. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  3370.  
  3371. /*
  3372. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3373. pathName and returned in the PackedPathName field.
  3374. lengthOfPathName is to be set the length of pathName structure.
  3375. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3376. OSErr will be returned.
  3377. */
  3378. /*
  3379. GetLocalNetworkSpec:
  3380. This call will return the Local NetworkSpec. Client should supply
  3381. an RString big enough to hold the NetworkSpec.
  3382. */
  3383. struct DirGetLocalNetworkSpecPB {
  3384.     void *                            qLink;
  3385.     long                             reserved1;
  3386.     long                             reserved2;
  3387.     DirIOCompletionUPP                 ioCompletion;
  3388.     OSErr                             ioResult;
  3389.     unsigned long                     saveA5;
  3390.     short                             reqCode;
  3391.     long                             reserved[2];
  3392.     AddrBlock                         serverHint;
  3393.     short                             dsRefNum;
  3394.     unsigned long                     callID;
  3395.     AuthIdentity                     identity;
  3396.     long                             gReserved1;
  3397.     long                             gReserved2;
  3398.     long                             gReserved3;
  3399.     long                             clientData;
  3400.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3401.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3402.     NetworkSpecPtr                     networkSpec;                /* <--  NetworkSpec */
  3403. };
  3404. typedef struct DirGetLocalNetworkSpecPB DirGetLocalNetworkSpecPB;
  3405.  
  3406. /*
  3407. PathName in the path field must be set to nil. internetName should be large
  3408. enough to hold the internetName. InterNetname returned indicates path finder's
  3409. local internet (configured by administrator).
  3410. */
  3411. /*
  3412. GetDNodeInfo:
  3413. This call will return the information (internetName and descriptor)
  3414. for the given RLI of a DNode.
  3415. */
  3416. struct DirGetDNodeInfoPB {
  3417.     void *                            qLink;
  3418.     long                             reserved1;
  3419.     long                             reserved2;
  3420.     DirIOCompletionUPP                 ioCompletion;
  3421.     OSErr                             ioResult;
  3422.     unsigned long                     saveA5;
  3423.     short                             reqCode;
  3424.     long                             reserved[2];
  3425.     AddrBlock                         serverHint;
  3426.     short                             dsRefNum;
  3427.     unsigned long                     callID;
  3428.     AuthIdentity                     identity;
  3429.     long                             gReserved1;
  3430.     long                             gReserved2;
  3431.     long                             gReserved3;
  3432.     long                             clientData;
  3433.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI whose info is requested */
  3434.     DirNodeKind                     descriptor;                    /* <--  dNode descriptor */
  3435.     NetworkSpecPtr                     networkSpec;                /* <--  cluster's networkSpec if kIsCluster */
  3436. };
  3437. typedef struct DirGetDNodeInfoPB DirGetDNodeInfoPB;
  3438.  
  3439. /*
  3440. If DnodeNumber is set to a non zero value, path should be set to nil.
  3441. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3442. internetName should be large enough to hold
  3443. the internetName. (If the internetName is same as the one got by
  3444. GetLocalInternetName call, it indicates cluster is reachable  without
  3445. forwarders, --> Tell me if I am wrong)
  3446. */
  3447. /*
  3448. DirCreatePersonalDirectory:
  3449. A new  personal catalog can be created by specifying an FSSpec for
  3450. the file. If a file already exists dupFNErr will be returned. This call is
  3451. supported 'synchronous' mode only.
  3452. */
  3453. struct DirCreatePersonalDirectoryPB {
  3454.     void *                            qLink;
  3455.     long                             reserved1;
  3456.     long                             reserved2;
  3457.     DirIOCompletionUPP                 ioCompletion;
  3458.     OSErr                             ioResult;
  3459.     unsigned long                     saveA5;
  3460.     short                             reqCode;
  3461.     long                             reserved[2];
  3462.     AddrBlock                         serverHint;
  3463.     short                             dsRefNum;
  3464.     unsigned long                     callID;
  3465.     AuthIdentity                     identity;
  3466.     long                             gReserved1;
  3467.     long                             gReserved2;
  3468.     long                             gReserved3;
  3469.     long                             clientData;
  3470.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the Personal Catalog */
  3471.     OSType                             fdType;                        /*  --> file type for the Personal Catalog */
  3472.     OSType                             fdCreator;                    /*  --> file creator for the Personal Catalog */
  3473. };
  3474. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  3475.  
  3476. /*
  3477. DirOpenPersonalDirectory:
  3478. An existing personal catalog can be opened using this call.
  3479. User can specify the personal catalog by FSSpec for the AddressBook file.
  3480. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3481. are the only accepted open modes for the address book.
  3482. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3483. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3484. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3485. associated with the personal catalog.
  3486. This call is supported 'synchronous' mode only.
  3487. */
  3488. struct DirOpenPersonalDirectoryPB {
  3489.     void *                            qLink;
  3490.     long                             reserved1;
  3491.     long                             reserved2;
  3492.     DirIOCompletionUPP                 ioCompletion;
  3493.     OSErr                             ioResult;
  3494.     unsigned long                     saveA5;
  3495.     short                             reqCode;
  3496.     long                             reserved[2];
  3497.     AddrBlock                         serverHint;
  3498.     short                             dsRefNum;
  3499.     unsigned long                     callID;
  3500.     AuthIdentity                     identity;
  3501.     long                             gReserved1;
  3502.     long                             gReserved2;
  3503.     long                             gReserved3;
  3504.     long                             clientData;
  3505.     FSSpecPtr                         fsSpec;                        /*  --> Open an existing Personal Catalog */
  3506.     SInt8                             accessRequested;            /*  --> Open: permissions Requested(byte)*/
  3507.     SInt8                             accessGranted;                /*  <-- Open: permissions (byte) (Granted)*/
  3508.     DirGestalt                         features;                    /* <--  features for Personal Catalog */
  3509. };
  3510. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  3511.  
  3512. /*
  3513. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3514. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3515. This call is supported 'synchronous' mode only.
  3516. */
  3517. struct DirClosePersonalDirectoryPB {
  3518.     void *                            qLink;
  3519.     long                             reserved1;
  3520.     long                             reserved2;
  3521.     DirIOCompletionUPP                 ioCompletion;
  3522.     OSErr                             ioResult;
  3523.     unsigned long                     saveA5;
  3524.     short                             reqCode;
  3525.     long                             reserved[2];
  3526.     AddrBlock                         serverHint;
  3527.     short                             dsRefNum;
  3528.     unsigned long                     callID;
  3529.     AuthIdentity                     identity;
  3530.     long                             gReserved1;
  3531.     long                             gReserved2;
  3532.     long                             gReserved3;
  3533.     long                             clientData;
  3534. };
  3535. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  3536.  
  3537. /*
  3538. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3539. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3540. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3541. If a client has a need to make the AddressBook reference to persistent
  3542. acrross boots it should make use of this call. In the current implementaion
  3543. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3544. If client has a need to make reference to the AddressBook, it must use
  3545. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3546. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3547.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3548.                         absolute alias is created.
  3549.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3550.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3551.                         fails with 'kOCEMoreData' error a client can reissue
  3552.                     this call with a larger buffer of this length.
  3553.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3554.   returned.
  3555. This call is supported in 'synchronous' mode only.
  3556. */
  3557. struct DirMakePersonalDirectoryRLIPB {
  3558.     void *                            qLink;
  3559.     long                             reserved1;
  3560.     long                             reserved2;
  3561.     DirIOCompletionUPP                 ioCompletion;
  3562.     OSErr                             ioResult;
  3563.     unsigned long                     saveA5;
  3564.     short                             reqCode;
  3565.     long                             reserved[2];
  3566.     AddrBlock                         serverHint;
  3567.     short                             dsRefNum;
  3568.     unsigned long                     callID;
  3569.     AuthIdentity                     identity;
  3570.     long                             gReserved1;
  3571.     long                             gReserved2;
  3572.     long                             gReserved3;
  3573.     long                             clientData;
  3574.     FSSpecPtr                         fromFSSpec;                    /*  --> FSSpec for creating relative alia */
  3575.     unsigned short                     pRLIBufferSize;                /*  --> Length of 'pRLI' buffer */
  3576.     unsigned short                     pRLISize;                    /* <--  Length of actual 'pRLI' */
  3577.     PackedRLIPtr                     pRLI;                        /* <--  pRLI for the specified AddressBook */
  3578. };
  3579. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  3580.  
  3581. /*
  3582. ****************************************************************************
  3583. The calls described below apply only for CSAM Drivers:
  3584.  
  3585. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3586.     DirAddDSAM
  3587.     DirRemoveDSAM
  3588.     DirInstantiateDSAM
  3589.  
  3590. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3591.     DirAddDSAMDirectory
  3592.     DirRemoveDirectory
  3593.  
  3594. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3595. with a CSAM catalog.
  3596.  
  3597. ****************************************************************************
  3598. */
  3599. /*
  3600. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3601. after discovering the CSAM file.
  3602.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3603.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3604.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3605. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3606. call returns 'daDSAMRecordCIDExists', record was already there and
  3607. 'dsamRecordCID' will be returned.
  3608. This call can be done only in synchronous mode.
  3609. */
  3610. struct DirAddDSAMPB {
  3611.     void *                            qLink;
  3612.     long                             reserved1;
  3613.     long                             reserved2;
  3614.     DirIOCompletionUPP                 ioCompletion;
  3615.     OSErr                             ioResult;
  3616.     unsigned long                     saveA5;
  3617.     short                             reqCode;
  3618.     long                             reserved[2];
  3619.     AddrBlock                         serverHint;
  3620.     short                             dsRefNum;
  3621.     unsigned long                     callID;
  3622.     AuthIdentity                     identity;
  3623.     long                             gReserved1;
  3624.     long                             gReserved2;
  3625.     long                             gReserved3;
  3626.     long                             clientData;
  3627.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3628.     RStringPtr                         dsamName;                    /*  --> CSAM name */
  3629.     OCEDirectoryKind                 dsamKind;                    /*  --> CSAM kind */
  3630.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the file containing CSAM */
  3631. };
  3632. typedef struct DirAddDSAMPB DirAddDSAMPB;
  3633.  
  3634. /*
  3635. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3636. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3637.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3638.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3639.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3640.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3641.     CSAM should already be setup using DirAddDSAM call.
  3642.     DSAMDirProc -> This procedure will be called when  any catalog service
  3643.     call intended for the CSAM (other then parse calls)
  3644.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3645.     are called.
  3646.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3647.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3648. This call can be done only in synchronous mode.
  3649. */
  3650. typedef pascal OSErr (*DSAMDirProcPtr)(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3651.  
  3652. #if GENERATINGCFM
  3653. typedef UniversalProcPtr DSAMDirUPP;
  3654. #else
  3655. typedef DSAMDirProcPtr DSAMDirUPP;
  3656. #endif
  3657. typedef DSAMDirUPP DSAMDirProc;
  3658. typedef pascal OSErr (*DSAMDirParseProcPtr)(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3659.  
  3660. #if GENERATINGCFM
  3661. typedef UniversalProcPtr DSAMDirParseUPP;
  3662. #else
  3663. typedef DSAMDirParseProcPtr DSAMDirParseUPP;
  3664. #endif
  3665. typedef DSAMDirParseUPP DSAMDirParseProc;
  3666. typedef pascal OSErr (*DSAMAuthProcPtr)(void *dsamData, AuthParamBlockPtr pb, Boolean async);
  3667.  
  3668. #if GENERATINGCFM
  3669. typedef UniversalProcPtr DSAMAuthUPP;
  3670. #else
  3671. typedef DSAMAuthProcPtr DSAMAuthUPP;
  3672. #endif
  3673. typedef DSAMAuthUPP DSAMAuthProc;
  3674. struct DirInstantiateDSAMPB {
  3675.     void *                            qLink;
  3676.     long                             reserved1;
  3677.     long                             reserved2;
  3678.     DirIOCompletionUPP                 ioCompletion;
  3679.     OSErr                             ioResult;
  3680.     unsigned long                     saveA5;
  3681.     short                             reqCode;
  3682.     long                             reserved[2];
  3683.     AddrBlock                         serverHint;
  3684.     short                             dsRefNum;
  3685.     unsigned long                     callID;
  3686.     AuthIdentity                     identity;
  3687.     long                             gReserved1;
  3688.     long                             gReserved2;
  3689.     long                             gReserved3;
  3690.     long                             clientData;
  3691.     RStringPtr                         dsamName;                    /*  --> dsamName name */
  3692.     OCEDirectoryKind                 dsamKind;                    /*  --> DSAMKind */
  3693.     void *                            dsamData;                    /*  --> dsamData  */
  3694.     DSAMDirUPP                         dsamDirProc;                /*  --> of type DSAMDirProc: for catalog service calls */
  3695.     DSAMDirParseUPP                 dsamDirParseProc;            /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  3696.     DSAMAuthUPP                     dsamAuthProc;                /*  --> of type DSAMAuthProc: for authetication service calls */
  3697. };
  3698. typedef struct DirInstantiateDSAMPB DirInstantiateDSAMPB;
  3699.  
  3700. /*
  3701. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3702.     dsamRecordCID -> is the creationID of the CSAM record.
  3703. This call can be made only in synchronous mode.
  3704. */
  3705. struct DirRemoveDSAMPB {
  3706.     void *                            qLink;
  3707.     long                             reserved1;
  3708.     long                             reserved2;
  3709.     DirIOCompletionUPP                 ioCompletion;
  3710.     OSErr                             ioResult;
  3711.     unsigned long                     saveA5;
  3712.     short                             reqCode;
  3713.     long                             reserved[2];
  3714.     AddrBlock                         serverHint;
  3715.     short                             dsRefNum;
  3716.     unsigned long                     callID;
  3717.     AuthIdentity                     identity;
  3718.     long                             gReserved1;
  3719.     long                             gReserved2;
  3720.     long                             gReserved3;
  3721.     long                             clientData;
  3722.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3723. };
  3724. typedef struct DirRemoveDSAMPB DirRemoveDSAMPB;
  3725.  
  3726. /*
  3727. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3728.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3729.     directoryName ->  name of the catalog
  3730.     discriminator -> discriminator for the catalog
  3731.     directoryRecordCID -> If the call is successful, creationID for the record will
  3732.                             be returned.
  3733. */
  3734. struct DirAddDSAMDirectoryPB {
  3735.     void *                            qLink;
  3736.     long                             reserved1;
  3737.     long                             reserved2;
  3738.     DirIOCompletionUPP                 ioCompletion;
  3739.     OSErr                             ioResult;
  3740.     unsigned long                     saveA5;
  3741.     short                             reqCode;
  3742.     long                             reserved[2];
  3743.     AddrBlock                         serverHint;
  3744.     short                             dsRefNum;
  3745.     unsigned long                     callID;
  3746.     AuthIdentity                     identity;
  3747.     long                             gReserved1;
  3748.     long                             gReserved2;
  3749.     long                             gReserved3;
  3750.     long                             clientData;
  3751.     CreationID                         dsamRecordCID;                /*  --> CreationID for the CSAM record */
  3752.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3753.     DirDiscriminator                 discriminator;                /*  --> catalog discriminator */
  3754.     DirGestalt                         features;                    /*  --> capabilty flags for the catalog */
  3755.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  3756. };
  3757. typedef struct DirAddDSAMDirectoryPB DirAddDSAMDirectoryPB;
  3758.  
  3759. /*
  3760. DirRemoveDirectory: This call can be used to inform the toolbox that
  3761. catalog specified by 'directoryRecordCID'
  3762. */
  3763. struct DirRemoveDirectoryPB {
  3764.     void *                            qLink;
  3765.     long                             reserved1;
  3766.     long                             reserved2;
  3767.     DirIOCompletionUPP                 ioCompletion;
  3768.     OSErr                             ioResult;
  3769.     unsigned long                     saveA5;
  3770.     short                             reqCode;
  3771.     long                             reserved[2];
  3772.     AddrBlock                         serverHint;
  3773.     short                             dsRefNum;
  3774.     unsigned long                     callID;
  3775.     AuthIdentity                     identity;
  3776.     long                             gReserved1;
  3777.     long                             gReserved2;
  3778.     long                             gReserved3;
  3779.     long                             clientData;
  3780.     CreationID                         directoryRecordCID;            /*  --> creationID for the catalog record */
  3781. };
  3782. typedef struct DirRemoveDirectoryPB DirRemoveDirectoryPB;
  3783.  
  3784. /*
  3785.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3786.  * the information of various foreign catalogs supported.
  3787.  * Typically a DE Template  may make this call to create a
  3788.  * Address template or a Gateway may make this call to findout
  3789.  * catalog name space in which MSAM may would support. 
  3790.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3791.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3792.  * returned and reissue the call with increaing buffer.
  3793.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3794.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3795.  * for each catalog will be packed in the format: 
  3796.  * typedef struct EachDirectoryData {
  3797.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3798.  *  OSType                            entnType;        //  Entn Type
  3799.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3800.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3801.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3802.  *    long                            length;        //  data length
  3803.  *    char                            data[length];  //  data padded to even boundary
  3804.  * };
  3805.  *
  3806.  *
  3807.  *
  3808.  * typedef struct myData {
  3809.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3810.  *    };
  3811.  *
  3812. */
  3813. struct DirGetExtendedDirectoriesInfoPB {
  3814.     void *                            qLink;
  3815.     long                             reserved1;
  3816.     long                             reserved2;
  3817.     DirIOCompletionUPP                 ioCompletion;
  3818.     OSErr                             ioResult;
  3819.     unsigned long                     saveA5;
  3820.     short                             reqCode;
  3821.     long                             reserved[2];
  3822.     AddrBlock                         serverHint;
  3823.     short                             dsRefNum;
  3824.     unsigned long                     callID;
  3825.     AuthIdentity                     identity;
  3826.     long                             gReserved1;
  3827.     long                             gReserved2;
  3828.     long                             gReserved3;
  3829.     long                             clientData;
  3830.     void *                            buffer;                        /*  --> Pointer to a buufer where data will be returned */
  3831.     unsigned long                     bufferSize;                    /*  --> Length of the buffer, Length of actual data will be returned here */
  3832.     unsigned long                     totalEntries;                /* <--  Total Number of Catalogs found */
  3833.     unsigned long                     actualEntries;                /* <--  Total Number of Catalogs entries returned */
  3834. };
  3835. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  3836.  
  3837. /*
  3838. DirGetDirectoryIconPB: With this call a client can find out about
  3839. the icons supported by the Catalog.
  3840. Both ADAP and Personal Catalog will not support this call for now.
  3841. A CSAM can support a call so that DE Extension can use this
  3842. call to find appropriate Icons.
  3843.  
  3844. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3845. */
  3846. struct DirGetDirectoryIconPB {
  3847.     void *                            qLink;
  3848.     long                             reserved1;
  3849.     long                             reserved2;
  3850.     DirIOCompletionUPP                 ioCompletion;
  3851.     OSErr                             ioResult;
  3852.     unsigned long                     saveA5;
  3853.     short                             reqCode;
  3854.     long                             reserved[2];
  3855.     AddrBlock                         serverHint;
  3856.     short                             dsRefNum;
  3857.     unsigned long                     callID;
  3858.     AuthIdentity                     identity;
  3859.     long                             gReserved1;
  3860.     long                             gReserved2;
  3861.     long                             gReserved3;
  3862.     long                             clientData;
  3863.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI for the catalog */
  3864.     OSType                             iconType;                    /*  --> Type of Icon requested */
  3865.     void *                            iconBuffer;                    /*  --> Buffer to hold Icon Data */
  3866.     unsigned long                     bufferSize;                    /*  <-> size of buffer to hold icon data */
  3867. };
  3868. typedef struct DirGetDirectoryIconPB DirGetDirectoryIconPB;
  3869.  
  3870. /*
  3871. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3872. and oceSetupRecordCID for the oceSetup Record.
  3873. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3874. make this call to get 'dsRefNum'.
  3875. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3876. */
  3877. struct DirGetOCESetupRefNumPB {
  3878.     void *                            qLink;
  3879.     long                             reserved1;
  3880.     long                             reserved2;
  3881.     DirIOCompletionUPP                 ioCompletion;
  3882.     OSErr                             ioResult;
  3883.     unsigned long                     saveA5;
  3884.     short                             reqCode;
  3885.     long                             reserved[2];
  3886.     AddrBlock                         serverHint;
  3887.     short                             dsRefNum;
  3888.     unsigned long                     callID;
  3889.     AuthIdentity                     identity;
  3890.     long                             gReserved1;
  3891.     long                             gReserved2;
  3892.     long                             gReserved3;
  3893.     long                             clientData;
  3894.     CreationID                         oceSetupRecordCID;            /* --> creationID for the catalog record */
  3895. };
  3896. typedef struct DirGetOCESetupRefNumPB DirGetOCESetupRefNumPB;
  3897.  
  3898. /*****************************************************************************/
  3899. /* Catalog and Authentication control blocks and operation definitions */
  3900. union AuthParamBlock {
  3901.     struct {
  3902.         void *                            qLink;
  3903.         long                             reserved1;
  3904.         long                             reserved2;
  3905.         AuthIOCompletionUPP             ioCompletion;
  3906.         OSErr                             ioResult;
  3907.         unsigned long                     saveA5;
  3908.         short                             reqCode;
  3909.         long                             reserved[2];
  3910.         AddrBlock                         serverHint;
  3911.         short                             dsRefNum;
  3912.         unsigned long                     callID;
  3913.         AuthIdentity                     identity;
  3914.         long                             gReserved1;
  3915.         long                             gReserved2;
  3916.         long                             gReserved3;
  3917.         long                             clientData;
  3918.     }                                 header;
  3919.     AuthBindSpecificIdentityPB         bindIdentityPB;
  3920.     AuthUnbindSpecificIdentityPB     unbindIdentityPB;
  3921.     AuthResolveCreationIDPB         resolveCreationIDPB;
  3922.     AuthGetSpecificIdentityInfoPB     getIdentityInfoPB;
  3923.     AuthAddKeyPB                     addKeyPB;
  3924.     AuthChangeKeyPB                 changeKeyPB;
  3925.     AuthDeleteKeyPB                 deleteKeyPB;
  3926.     AuthPasswordToKeyPB             passwordToKeyPB;
  3927.     AuthGetCredentialsPB             getCredentialsPB;
  3928.     AuthDecryptCredentialsPB         decryptCredentialsPB;
  3929.     AuthMakeChallengePB             makeChallengePB;
  3930.     AuthMakeReplyPB                 makeReplyPB;
  3931.     AuthVerifyReplyPB                 verifyReplyPB;
  3932.     AuthGetUTCTimePB                 getUTCTimePB;
  3933.     AuthMakeProxyPB                 makeProxyPB;
  3934.     AuthTradeProxyForCredentialsPB     tradeProxyForCredentialsPB;
  3935.     AuthGetLocalIdentityPB             getLocalIdentityPB;
  3936.     AuthUnlockLocalIdentityPB         unLockLocalIdentityPB;
  3937.     AuthLockLocalIdentityPB         lockLocalIdentityPB;
  3938.     AuthAddToLocalIdentityQueuePB     localIdentityQInstallPB;
  3939.     AuthRemoveFromLocalIdentityQueuePB  localIdentityQRemovePB;
  3940.     AuthSetupLocalIdentityPB         setupLocalIdentityPB;
  3941.     AuthChangeLocalIdentityPB         changeLocalIdentityPB;
  3942.     AuthRemoveLocalIdentityPB         removeLocalIdentityPB;
  3943.     OCESetupAddDirectoryInfoPB         setupDirectoryIdentityPB;
  3944.     OCESetupChangeDirectoryInfoPB     changeDirectoryIdentityPB;
  3945.     OCESetupRemoveDirectoryInfoPB     removeDirectoryIdentityPB;
  3946.     OCESetupGetDirectoryInfoPB         getDirectoryIdentityInfoPB;
  3947. };
  3948.  
  3949. union DirParamBlock {
  3950.     struct {
  3951.         void *                            qLink;
  3952.         long                             reserved1;
  3953.         long                             reserved2;
  3954.         DirIOCompletionUPP                 ioCompletion;
  3955.         OSErr                             ioResult;
  3956.         unsigned long                     saveA5;
  3957.         short                             reqCode;
  3958.         long                             reserved[2];
  3959.         AddrBlock                         serverHint;
  3960.         short                             dsRefNum;
  3961.         unsigned long                     callID;
  3962.         AuthIdentity                     identity;
  3963.         long                             gReserved1;
  3964.         long                             gReserved2;
  3965.         long                             gReserved3;
  3966.         long                             clientData;
  3967.     }                                 header;
  3968.     DirAddRecordPB                     addRecordPB;
  3969.     DirDeleteRecordPB                 deleteRecordPB;
  3970.     DirEnumerateGetPB                 enumerateGetPB;
  3971.     DirEnumerateParsePB             enumerateParsePB;
  3972.     DirFindRecordGetPB                 findRecordGetPB;
  3973.     DirFindRecordParsePB             findRecordParsePB;
  3974.     DirLookupGetPB                     lookupGetPB;
  3975.     DirLookupParsePB                 lookupParsePB;
  3976.     DirAddAttributeValuePB             addAttributeValuePB;
  3977.     DirDeleteAttributeTypePB         deleteAttributeTypePB;
  3978.     DirDeleteAttributeValuePB         deleteAttributeValuePB;
  3979.     DirChangeAttributeValuePB         changeAttributeValuePB;
  3980.     DirVerifyAttributeValuePB         verifyAttributeValuePB;
  3981.     DirFindValuePB                     findValuePB;
  3982.     DirEnumeratePseudonymGetPB         enumeratePseudonymGetPB;
  3983.     DirEnumeratePseudonymParsePB     enumeratePseudonymParsePB;
  3984.     DirAddPseudonymPB                 addPseudonymPB;
  3985.     DirDeletePseudonymPB             deletePseudonymPB;
  3986.     DirAddAliasPB                     addAliasPB;
  3987.     DirEnumerateAttributeTypesGetPB  enumerateAttributeTypesGetPB;
  3988.     DirEnumerateAttributeTypesParsePB  enumerateAttributeTypesParsePB;
  3989.     DirGetNameAndTypePB             getNameAndTypePB;
  3990.     DirSetNameAndTypePB             setNameAndTypePB;
  3991.     DirGetRecordMetaInfoPB             getRecordMetaInfoPB;
  3992.     DirGetDNodeMetaInfoPB             getDNodeMetaInfoPB;
  3993.     DirGetDirectoryInfoPB             getDirectoryInfoPB;
  3994.  
  3995.     DirGetDNodeAccessControlGetPB     getDNodeAccessControlGetPB;
  3996.     DirGetDNodeAccessControlParsePB  getDNodeAccessControlParsePB;
  3997.  
  3998.     DirGetRecordAccessControlGetPB     getRecordAccessControlGetPB;
  3999.     DirGetRecordAccessControlParsePB  getRecordAccessControlParsePB;
  4000.  
  4001.     DirGetAttributeAccessControlGetPB  getAttributeAccessControlGetPB;
  4002.     DirGetAttributeAccessControlParsePB  getAttributeAccessControlParsePB;
  4003.  
  4004.  
  4005.     DirEnumerateDirectoriesGetPB     enumerateDirectoriesGetPB;
  4006.     DirEnumerateDirectoriesParsePB     enumerateDirectoriesParsePB;
  4007.  
  4008.     DirAddADAPDirectoryPB             addADAPDirectoryPB;
  4009.     DirRemoveDirectoryPB             removeDirectoryPB;
  4010.     DirNetSearchADAPDirectoriesGetPB  netSearchADAPDirectoriesGetPB;
  4011.     DirNetSearchADAPDirectoriesParsePB  netSearchADAPDirectoriesParsePB;
  4012.     DirFindADAPDirectoryByNetSearchPB  findADAPDirectoryByNetSearchPB;
  4013.  
  4014.  
  4015.     DirMapDNodeNumberToPathNamePB     mapDNodeNumberToPathNamePB;
  4016.     DirMapPathNameToDNodeNumberPB     mapPathNameToDNodeNumberPB;
  4017.     DirGetLocalNetworkSpecPB         getLocalNetworkSpecPB;
  4018.     DirGetDNodeInfoPB                 getDNodeInfoPB;
  4019.  
  4020.     DirCreatePersonalDirectoryPB     createPersonalDirectoryPB;
  4021.     DirOpenPersonalDirectoryPB         openPersonalDirectoryPB;
  4022.     DirClosePersonalDirectoryPB     closePersonalDirectoryPB;
  4023.     DirMakePersonalDirectoryRLIPB     makePersonalDirectoryRLIPB;
  4024.  
  4025.     DirAddDSAMPB                     addDSAMPB;
  4026.     DirInstantiateDSAMPB             instantiateDSAMPB;
  4027.     DirRemoveDSAMPB                 removeDSAMPB;
  4028.     DirAddDSAMDirectoryPB             addDSAMDirectoryPB;
  4029.     DirGetExtendedDirectoriesInfoPB  getExtendedDirectoriesInfoPB;
  4030.     DirGetDirectoryIconPB             getDirectoryIconPB;
  4031.  
  4032.     DirGetOCESetupRefNumPB             dirGetOCESetupRefNumPB;
  4033.  
  4034.     DirAbortPB                         abortPB;
  4035. };
  4036.  
  4037.  
  4038. enum {
  4039.     uppAuthIOCompletionProcInfo = kRegisterBased
  4040.          | REGISTER_ROUTINE_PARAMETER(1, kRegisterA0, SIZE_CODE(sizeof(AuthParamBlockPtr))),
  4041.     uppNotificationProcInfo = kPascalStackBased
  4042.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4043.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4044.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AuthLocalIdentityOp)))
  4045.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AuthLocalIdentityLockAction)))
  4046.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(LocalIdentity))),
  4047.     uppDirIOCompletionProcInfo = kRegisterBased
  4048.          | REGISTER_ROUTINE_PARAMETER(1, kRegisterA0, SIZE_CODE(sizeof(DirParamBlockPtr))),
  4049.     uppForEachDirEnumSpecProcInfo = kPascalStackBased
  4050.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4051.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4052.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DirEnumSpec *))),
  4053.     uppForEachRecordProcInfo = kPascalStackBased
  4054.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4055.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4056.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DirEnumSpec *)))
  4057.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(PackedRLIPtr))),
  4058.     uppForEachLookupRecordIDProcInfo = kPascalStackBased
  4059.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4060.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4061.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const RecordID *))),
  4062.     uppForEachAttrTypeLookupProcInfo = kPascalStackBased
  4063.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4064.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4065.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const AttributeType *)))
  4066.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask))),
  4067.     uppForEachAttrValueProcInfo = kPascalStackBased
  4068.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4069.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4070.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const Attribute *))),
  4071.     uppForEachAttrTypeProcInfo = kPascalStackBased
  4072.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4073.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4074.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const AttributeType *))),
  4075.     uppForEachRecordIDProcInfo = kPascalStackBased
  4076.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4077.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4078.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const RecordID *))),
  4079.     uppForEachDirectoryProcInfo = kPascalStackBased
  4080.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4081.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4082.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DirectoryName *)))
  4083.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const DirDiscriminator *)))
  4084.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DirGestalt))),
  4085.     uppForEachADAPDirectoryProcInfo = kPascalStackBased
  4086.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4087.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4088.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DirectoryName *)))
  4089.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const DirDiscriminator *)))
  4090.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DirGestalt)))
  4091.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AddrBlock))),
  4092.     uppForEachDNodeAccessControlProcInfo = kPascalStackBased
  4093.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4094.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4095.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DSSpec *)))
  4096.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4097.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4098.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4099.     uppForEachRecordAccessControlProcInfo = kPascalStackBased
  4100.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4101.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4102.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DSSpec *)))
  4103.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4104.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4105.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4106.     uppForEachAttributeAccessControlProcInfo = kPascalStackBased
  4107.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4108.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4109.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const DSSpec *)))
  4110.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4111.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4112.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4113.     uppDSAMDirProcInfo = kPascalStackBased
  4114.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4115.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  4116.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirParamBlockPtr)))
  4117.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean))),
  4118.     uppDSAMDirParseProcInfo = kPascalStackBased
  4119.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4120.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  4121.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirParamBlockPtr)))
  4122.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean))),
  4123.     uppDSAMAuthProcInfo = kPascalStackBased
  4124.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4125.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  4126.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AuthParamBlockPtr)))
  4127.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean)))
  4128. };
  4129.  
  4130. #if GENERATINGCFM
  4131. #define CallAuthIOCompletionProc(userRoutine, paramBlock)        \
  4132.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, (paramBlock))
  4133. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)        \
  4134.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
  4135. #define CallDirIOCompletionProc(userRoutine, paramBlock)        \
  4136.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDirIOCompletionProcInfo, (paramBlock))
  4137. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)        \
  4138.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
  4139. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)        \
  4140.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
  4141. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)        \
  4142.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
  4143. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)        \
  4144.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
  4145. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)        \
  4146.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrValueProcInfo, (clientData), (attribute))
  4147. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)        \
  4148.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, (clientData), (attrType))
  4149. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)        \
  4150.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordIDProcInfo, (clientData), (recordID))
  4151. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)        \
  4152.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
  4153. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)        \
  4154.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
  4155. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)        \
  4156.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4157. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)        \
  4158.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4159. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)        \
  4160.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4161. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)        \
  4162.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
  4163. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)        \
  4164.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
  4165. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)        \
  4166.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
  4167. #else
  4168. /* (*AuthIOCompletionUPP) cannot be called from a high-level language without the Mixed Mode Manager */
  4169. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)        \
  4170.         (*(userRoutine))((clientData), (callValue), (actionValue), (identity))
  4171. /* (*DirIOCompletionUPP) cannot be called from a high-level language without the Mixed Mode Manager */
  4172. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)        \
  4173.         (*(userRoutine))((clientData), (enumSpec))
  4174. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)        \
  4175.         (*(userRoutine))((clientData), (enumSpec), (pRLI))
  4176. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)        \
  4177.         (*(userRoutine))((clientData), (recordID))
  4178. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)        \
  4179.         (*(userRoutine))((clientData), (attrType), (myAttrAccMask))
  4180. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)        \
  4181.         (*(userRoutine))((clientData), (attribute))
  4182. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)        \
  4183.         (*(userRoutine))((clientData), (attrType))
  4184. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)        \
  4185.         (*(userRoutine))((clientData), (recordID))
  4186. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)        \
  4187.         (*(userRoutine))((clientData), (dirName), (discriminator), (features))
  4188. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)        \
  4189.         (*(userRoutine))((clientData), (dirName), (discriminator), (features), (serverHint))
  4190. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)        \
  4191.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4192. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)        \
  4193.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4194. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)        \
  4195.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4196. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)        \
  4197.         (*(userRoutine))((dsamData), (paramBlock), (async))
  4198. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)        \
  4199.         (*(userRoutine))((dsamData), (paramBlock), (async))
  4200. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)        \
  4201.         (*(userRoutine))((dsamData), (pb), (async))
  4202. #endif
  4203.  
  4204. #if GENERATINGCFM
  4205. #define NewAuthIOCompletionProc(userRoutine)        \
  4206.         (AuthIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
  4207. #define NewNotificationProc(userRoutine)        \
  4208.         (NotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
  4209. #define NewDirIOCompletionProc(userRoutine)        \
  4210.         (DirIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
  4211. #define NewForEachDirEnumSpecProc(userRoutine)        \
  4212.         (ForEachDirEnumSpecUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
  4213. #define NewForEachRecordProc(userRoutine)        \
  4214.         (ForEachRecordUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
  4215. #define NewForEachLookupRecordIDProc(userRoutine)        \
  4216.         (ForEachLookupRecordIDUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
  4217. #define NewForEachAttrTypeLookupProc(userRoutine)        \
  4218.         (ForEachAttrTypeLookupUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
  4219. #define NewForEachAttrValueProc(userRoutine)        \
  4220.         (ForEachAttrValueUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
  4221. #define NewForEachAttrTypeProc(userRoutine)        \
  4222.         (ForEachAttrTypeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
  4223. #define NewForEachRecordIDProc(userRoutine)        \
  4224.         (ForEachRecordIDUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
  4225. #define NewForEachDirectoryProc(userRoutine)        \
  4226.         (ForEachDirectoryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
  4227. #define NewForEachADAPDirectoryProc(userRoutine)        \
  4228.         (ForEachADAPDirectoryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
  4229. #define NewForEachDNodeAccessControlProc(userRoutine)        \
  4230.         (ForEachDNodeAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
  4231. #define NewForEachRecordAccessControlProc(userRoutine)        \
  4232.         (ForEachRecordAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
  4233. #define NewForEachAttributeAccessControlProc(userRoutine)        \
  4234.         (ForEachAttributeAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
  4235. #define NewDSAMDirProc(userRoutine)        \
  4236.         (DSAMDirUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
  4237. #define NewDSAMDirParseProc(userRoutine)        \
  4238.         (DSAMDirParseUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
  4239. #define NewDSAMAuthProc(userRoutine)        \
  4240.         (DSAMAuthUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
  4241. #else
  4242. #define NewAuthIOCompletionProc(userRoutine)        \
  4243.         ((AuthIOCompletionUPP) (userRoutine))
  4244. #define NewNotificationProc(userRoutine)        \
  4245.         ((NotificationUPP) (userRoutine))
  4246. #define NewDirIOCompletionProc(userRoutine)        \
  4247.         ((DirIOCompletionUPP) (userRoutine))
  4248. #define NewForEachDirEnumSpecProc(userRoutine)        \
  4249.         ((ForEachDirEnumSpecUPP) (userRoutine))
  4250. #define NewForEachRecordProc(userRoutine)        \
  4251.         ((ForEachRecordUPP) (userRoutine))
  4252. #define NewForEachLookupRecordIDProc(userRoutine)        \
  4253.         ((ForEachLookupRecordIDUPP) (userRoutine))
  4254. #define NewForEachAttrTypeLookupProc(userRoutine)        \
  4255.         ((ForEachAttrTypeLookupUPP) (userRoutine))
  4256. #define NewForEachAttrValueProc(userRoutine)        \
  4257.         ((ForEachAttrValueUPP) (userRoutine))
  4258. #define NewForEachAttrTypeProc(userRoutine)        \
  4259.         ((ForEachAttrTypeUPP) (userRoutine))
  4260. #define NewForEachRecordIDProc(userRoutine)        \
  4261.         ((ForEachRecordIDUPP) (userRoutine))
  4262. #define NewForEachDirectoryProc(userRoutine)        \
  4263.         ((ForEachDirectoryUPP) (userRoutine))
  4264. #define NewForEachADAPDirectoryProc(userRoutine)        \
  4265.         ((ForEachADAPDirectoryUPP) (userRoutine))
  4266. #define NewForEachDNodeAccessControlProc(userRoutine)        \
  4267.         ((ForEachDNodeAccessControlUPP) (userRoutine))
  4268. #define NewForEachRecordAccessControlProc(userRoutine)        \
  4269.         ((ForEachRecordAccessControlUPP) (userRoutine))
  4270. #define NewForEachAttributeAccessControlProc(userRoutine)        \
  4271.         ((ForEachAttributeAccessControlUPP) (userRoutine))
  4272. #define NewDSAMDirProc(userRoutine)        \
  4273.         ((DSAMDirUPP) (userRoutine))
  4274. #define NewDSAMDirParseProc(userRoutine)        \
  4275.         ((DSAMDirParseUPP) (userRoutine))
  4276. #define NewDSAMAuthProc(userRoutine)        \
  4277.         ((DSAMAuthUPP) (userRoutine))
  4278. #endif
  4279. extern pascal OSErr AuthBindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4280.  THREEWORDINLINE(0x3F3C, 0x0200, 0xAA5E);
  4281.  
  4282. extern pascal OSErr AuthUnbindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4283.  THREEWORDINLINE(0x3F3C, 0x0201, 0xAA5E);
  4284.  
  4285. extern pascal OSErr AuthResolveCreationID(AuthParamBlockPtr paramBlock, Boolean async)
  4286.  THREEWORDINLINE(0x3F3C, 0x0202, 0xAA5E);
  4287.  
  4288. extern pascal OSErr AuthGetSpecificIdentityInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4289.  THREEWORDINLINE(0x3F3C, 0x0203, 0xAA5E);
  4290.  
  4291. extern pascal OSErr AuthAddKey(AuthParamBlockPtr paramBlock, Boolean async)
  4292.  THREEWORDINLINE(0x3F3C, 0x0207, 0xAA5E);
  4293.  
  4294. extern pascal OSErr AuthChangeKey(AuthParamBlockPtr paramBlock, Boolean async)
  4295.  THREEWORDINLINE(0x3F3C, 0x0208, 0xAA5E);
  4296.  
  4297. extern pascal OSErr AuthDeleteKey(AuthParamBlockPtr paramBlock, Boolean async)
  4298.  THREEWORDINLINE(0x3F3C, 0x0209, 0xAA5E);
  4299.  
  4300. extern pascal OSErr AuthPasswordToKey(AuthParamBlockPtr paramBlock, Boolean async)
  4301.  THREEWORDINLINE(0x3F3C, 0x020A, 0xAA5E);
  4302.  
  4303. extern pascal OSErr AuthGetCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4304.  THREEWORDINLINE(0x3F3C, 0x020B, 0xAA5E);
  4305.  
  4306. extern pascal OSErr AuthDecryptCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4307.  THREEWORDINLINE(0x3F3C, 0x020C, 0xAA5E);
  4308.  
  4309. extern pascal OSErr AuthMakeChallenge(AuthParamBlockPtr paramBlock, Boolean async)
  4310.  THREEWORDINLINE(0x3F3C, 0x020F, 0xAA5E);
  4311.  
  4312. extern pascal OSErr AuthMakeReply(AuthParamBlockPtr paramBlock, Boolean async)
  4313.  THREEWORDINLINE(0x3F3C, 0x0210, 0xAA5E);
  4314.  
  4315. extern pascal OSErr AuthVerifyReply(AuthParamBlockPtr paramBlock, Boolean async)
  4316.  THREEWORDINLINE(0x3F3C, 0x0211, 0xAA5E);
  4317.  
  4318. extern pascal OSErr AuthGetUTCTime(AuthParamBlockPtr paramBlock, Boolean async)
  4319.  THREEWORDINLINE(0x3F3C, 0x021A, 0xAA5E);
  4320.  
  4321. extern pascal OSErr AuthMakeProxy(AuthParamBlockPtr paramBlock, Boolean async)
  4322.  THREEWORDINLINE(0x3F3C, 0x0212, 0xAA5E);
  4323.  
  4324. extern pascal OSErr AuthTradeProxyForCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4325.  THREEWORDINLINE(0x3F3C, 0x0213, 0xAA5E);
  4326.  
  4327. /* Local Identity API */
  4328. extern pascal OSErr AuthGetLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4329.  THREEWORDINLINE(0x3F3C, 0x0204, 0xAA5E);
  4330.  
  4331. extern pascal OSErr AuthUnlockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4332.  THREEWORDINLINE(0x3F3C, 0x0214, 0xAA5E);
  4333.  
  4334. extern pascal OSErr AuthLockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4335.  THREEWORDINLINE(0x3F3C, 0x0215, 0xAA5E);
  4336.  
  4337. extern pascal OSErr AuthAddToLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  4338.  THREEWORDINLINE(0x3F3C, 0x0205, 0xAA5E);
  4339.  
  4340. extern pascal OSErr AuthRemoveFromLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  4341.  THREEWORDINLINE(0x3F3C, 0x0206, 0xAA5E);
  4342.  
  4343. extern pascal OSErr AuthSetupLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4344.  THREEWORDINLINE(0x3F3C, 0x0216, 0xAA5E);
  4345.  
  4346. extern pascal OSErr AuthChangeLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4347.  THREEWORDINLINE(0x3F3C, 0x0217, 0xAA5E);
  4348.  
  4349. extern pascal OSErr AuthRemoveLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4350.  THREEWORDINLINE(0x3F3C, 0x0218, 0xAA5E);
  4351.  
  4352. extern pascal OSErr DirAddRecord(DirParamBlockPtr paramBlock, Boolean async)
  4353.  THREEWORDINLINE(0x3F3C, 0x0109, 0xAA5E);
  4354.  
  4355. extern pascal OSErr DirDeleteRecord(DirParamBlockPtr paramBlock, Boolean async)
  4356.  THREEWORDINLINE(0x3F3C, 0x010A, 0xAA5E);
  4357.  
  4358. extern pascal OSErr DirEnumerateGet(DirParamBlockPtr paramBlock, Boolean async)
  4359.  THREEWORDINLINE(0x3F3C, 0x0111, 0xAA5E);
  4360.  
  4361. extern pascal OSErr DirEnumerateParse(DirParamBlockPtr paramBlock, Boolean async)
  4362.  THREEWORDINLINE(0x3F3C, 0x0101, 0xAA5E);
  4363.  
  4364. extern pascal OSErr DirFindRecordGet(DirParamBlockPtr paramBlock, Boolean async)
  4365.  THREEWORDINLINE(0x3F3C, 0x0140, 0xAA5E);
  4366.  
  4367. extern pascal OSErr DirFindRecordParse(DirParamBlockPtr paramBlock, Boolean async)
  4368.  THREEWORDINLINE(0x3F3C, 0x0141, 0xAA5E);
  4369.  
  4370. extern pascal OSErr DirLookupGet(DirParamBlockPtr paramBlock, Boolean async)
  4371.  THREEWORDINLINE(0x3F3C, 0x0117, 0xAA5E);
  4372.  
  4373. extern pascal OSErr DirLookupParse(DirParamBlockPtr paramBlock, Boolean async)
  4374.  THREEWORDINLINE(0x3F3C, 0x0102, 0xAA5E);
  4375.  
  4376. extern pascal OSErr DirAddAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4377.  THREEWORDINLINE(0x3F3C, 0x010B, 0xAA5E);
  4378.  
  4379. extern pascal OSErr DirDeleteAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4380.  THREEWORDINLINE(0x3F3C, 0x010C, 0xAA5E);
  4381.  
  4382. extern pascal OSErr DirDeleteAttributeType(DirParamBlockPtr paramBlock, Boolean async)
  4383.  THREEWORDINLINE(0x3F3C, 0x0130, 0xAA5E);
  4384.  
  4385. extern pascal OSErr DirChangeAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4386.  THREEWORDINLINE(0x3F3C, 0x010D, 0xAA5E);
  4387.  
  4388. extern pascal OSErr DirVerifyAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4389.  THREEWORDINLINE(0x3F3C, 0x010E, 0xAA5E);
  4390.  
  4391. extern pascal OSErr DirFindValue(DirParamBlockPtr paramBlock, Boolean async)
  4392.  THREEWORDINLINE(0x3F3C, 0x0126, 0xAA5E);
  4393.  
  4394. extern pascal OSErr DirEnumerateAttributeTypesGet(DirParamBlockPtr paramBlock, Boolean async)
  4395.  THREEWORDINLINE(0x3F3C, 0x0112, 0xAA5E);
  4396.  
  4397. extern pascal OSErr DirEnumerateAttributeTypesParse(DirParamBlockPtr paramBlock, Boolean async)
  4398.  THREEWORDINLINE(0x3F3C, 0x0103, 0xAA5E);
  4399.  
  4400. extern pascal OSErr DirAddPseudonym(DirParamBlockPtr paramBlock, Boolean async)
  4401.  THREEWORDINLINE(0x3F3C, 0x010F, 0xAA5E);
  4402.  
  4403. extern pascal OSErr DirDeletePseudonym(DirParamBlockPtr paramBlock, Boolean async)
  4404.  THREEWORDINLINE(0x3F3C, 0x0110, 0xAA5E);
  4405.  
  4406. extern pascal OSErr DirAddAlias(DirParamBlockPtr paramBlock, Boolean async)
  4407.  THREEWORDINLINE(0x3F3C, 0x011C, 0xAA5E);
  4408.  
  4409. extern pascal OSErr DirEnumeratePseudonymGet(DirParamBlockPtr paramBlock, Boolean async)
  4410.  THREEWORDINLINE(0x3F3C, 0x0113, 0xAA5E);
  4411.  
  4412. extern pascal OSErr DirEnumeratePseudonymParse(DirParamBlockPtr paramBlock, Boolean async)
  4413.  THREEWORDINLINE(0x3F3C, 0x0104, 0xAA5E);
  4414.  
  4415. extern pascal OSErr DirGetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  4416.  THREEWORDINLINE(0x3F3C, 0x0114, 0xAA5E);
  4417.  
  4418. extern pascal OSErr DirSetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  4419.  THREEWORDINLINE(0x3F3C, 0x0115, 0xAA5E);
  4420.  
  4421. extern pascal OSErr DirGetRecordMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  4422.  THREEWORDINLINE(0x3F3C, 0x0116, 0xAA5E);
  4423.  
  4424. extern pascal OSErr DirGetDNodeMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  4425.  THREEWORDINLINE(0x3F3C, 0x0118, 0xAA5E);
  4426.  
  4427. extern pascal OSErr DirGetDirectoryInfo(DirParamBlockPtr paramBlock, Boolean async)
  4428.  THREEWORDINLINE(0x3F3C, 0x0119, 0xAA5E);
  4429.  
  4430. extern pascal OSErr DirGetDNodeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4431.  THREEWORDINLINE(0x3F3C, 0x012A, 0xAA5E);
  4432.  
  4433. extern pascal OSErr DirGetDNodeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4434.  THREEWORDINLINE(0x3F3C, 0x012F, 0xAA5E);
  4435.  
  4436. extern pascal OSErr DirGetRecordAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4437.  THREEWORDINLINE(0x3F3C, 0x012C, 0xAA5E);
  4438.  
  4439. extern pascal OSErr DirGetRecordAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4440.  THREEWORDINLINE(0x3F3C, 0x0134, 0xAA5E);
  4441.  
  4442. extern pascal OSErr DirGetAttributeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4443.  THREEWORDINLINE(0x3F3C, 0x012E, 0xAA5E);
  4444.  
  4445. extern pascal OSErr DirGetAttributeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4446.  THREEWORDINLINE(0x3F3C, 0x0138, 0xAA5E);
  4447.  
  4448. extern pascal OSErr DirEnumerateDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  4449.  THREEWORDINLINE(0x3F3C, 0x011A, 0xAA5E);
  4450.  
  4451. extern pascal OSErr DirEnumerateDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  4452.  THREEWORDINLINE(0x3F3C, 0x0106, 0xAA5E);
  4453.  
  4454. extern pascal OSErr DirMapPathNameToDNodeNumber(DirParamBlockPtr paramBlock, Boolean async)
  4455.  THREEWORDINLINE(0x3F3C, 0x0122, 0xAA5E);
  4456.  
  4457. extern pascal OSErr DirMapDNodeNumberToPathName(DirParamBlockPtr paramBlock, Boolean async)
  4458.  THREEWORDINLINE(0x3F3C, 0x0123, 0xAA5E);
  4459.  
  4460. extern pascal OSErr DirGetLocalNetworkSpec(DirParamBlockPtr paramBlock, Boolean async)
  4461.  THREEWORDINLINE(0x3F3C, 0x0124, 0xAA5E);
  4462.  
  4463. extern pascal OSErr DirGetDNodeInfo(DirParamBlockPtr paramBlock, Boolean async)
  4464.  THREEWORDINLINE(0x3F3C, 0x0125, 0xAA5E);
  4465.  
  4466. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  4467. extern pascal OSErr DirCreatePersonalDirectory(DirParamBlockPtr paramBlock)
  4468.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011F, 0xAA5E);
  4469.  
  4470. extern pascal OSErr DirOpenPersonalDirectory(DirParamBlockPtr paramBlock)
  4471.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011E, 0xAA5E);
  4472.  
  4473. extern pascal OSErr DirClosePersonalDirectory(DirParamBlockPtr paramBlock)
  4474.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0131, 0xAA5E);
  4475.  
  4476. extern pascal OSErr DirMakePersonalDirectoryRLI(DirParamBlockPtr paramBlock)
  4477.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0132, 0xAA5E);
  4478.  
  4479. extern pascal OSErr DirAddDSAM(DirParamBlockPtr paramBlock)
  4480.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011D, 0xAA5E);
  4481.  
  4482. extern pascal OSErr DirInstantiateDSAM(DirParamBlockPtr paramBlock)
  4483.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0127, 0xAA5E);
  4484.  
  4485. extern pascal OSErr DirRemoveDSAM(DirParamBlockPtr paramBlock)
  4486.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0120, 0xAA5E);
  4487.  
  4488. extern pascal OSErr DirAddDSAMDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4489.  THREEWORDINLINE(0x3F3C, 0x0133, 0xAA5E);
  4490.  
  4491. extern pascal OSErr DirGetExtendedDirectoriesInfo(DirParamBlockPtr paramBlock, Boolean async)
  4492.  THREEWORDINLINE(0x3F3C, 0x0136, 0xAA5E);
  4493.  
  4494. extern pascal OSErr DirGetDirectoryIcon(DirParamBlockPtr paramBlock, Boolean async)
  4495.  THREEWORDINLINE(0x3F3C, 0x0121, 0xAA5E);
  4496.  
  4497. extern pascal OSErr DirAddADAPDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4498.  THREEWORDINLINE(0x3F3C, 0x0137, 0xAA5E);
  4499.  
  4500. extern pascal OSErr DirRemoveDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4501.  THREEWORDINLINE(0x3F3C, 0x0135, 0xAA5E);
  4502.  
  4503. extern pascal OSErr DirNetSearchADAPDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  4504.  THREEWORDINLINE(0x3F3C, 0x0108, 0xAA5E);
  4505.  
  4506. extern pascal OSErr DirNetSearchADAPDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  4507.  THREEWORDINLINE(0x3F3C, 0x0105, 0xAA5E);
  4508.  
  4509. extern pascal OSErr DirFindADAPDirectoryByNetSearch(DirParamBlockPtr paramBlock, Boolean async)
  4510.  THREEWORDINLINE(0x3F3C, 0x0107, 0xAA5E);
  4511.  
  4512. extern pascal OSErr DirGetOCESetupRefNum(DirParamBlockPtr paramBlock, Boolean async)
  4513.  THREEWORDINLINE(0x3F3C, 0x0128, 0xAA5E);
  4514.  
  4515. extern pascal OSErr DirAbort(DirParamBlockPtr paramBlock)
  4516.  FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011B, 0xAA5E);
  4517.  
  4518. extern pascal OSErr OCESetupAddDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4519.  THREEWORDINLINE(0x3F3C, 0x0219, 0xAA5E);
  4520.  
  4521. extern pascal OSErr OCESetupChangeDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4522.  THREEWORDINLINE(0x3F3C, 0x021B, 0xAA5E);
  4523.  
  4524. extern pascal OSErr OCESetupRemoveDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4525.  THREEWORDINLINE(0x3F3C, 0x020D, 0xAA5E);
  4526.  
  4527. extern pascal OSErr OCESetupGetDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4528.  THREEWORDINLINE(0x3F3C, 0x020E, 0xAA5E);
  4529.  
  4530. #endif
  4531.  
  4532. #if PRAGMA_ALIGN_SUPPORTED
  4533. #pragma options align=reset
  4534. #endif
  4535.  
  4536. #if PRAGMA_IMPORT_SUPPORTED
  4537. #pragma import off
  4538. #endif
  4539.  
  4540. #ifdef __cplusplus
  4541. }
  4542. #endif
  4543.  
  4544. #endif /* __OCEAUTHDIR__ */
  4545.  
  4546.